Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Speech / Src / Internal / GrammarBuilding / IdentifierCollection.cs / 1 / IdentifierCollection.cs
//------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------
using System.Collections.Generic;
namespace System.Speech.Internal.GrammarBuilding
{
///
///
///
internal class IdentifierCollection
{
//*******************************************************************
//
// Constructors
//
//*******************************************************************
#region Constructors
///
///
///
internal IdentifierCollection()
{
_identifiers = new List();
CreateNewIdentifier ("_");
}
#endregion
//********************************************************************
//
// Internal Methods
//
//*******************************************************************
#region Internal Methods
///
///
///
///
///
internal string CreateNewIdentifier(string id)
{
if (!_identifiers.Contains(id))
{
_identifiers.Add(id);
return id;
}
else
{
string newId;
int i = 1;
do
{
newId = id + i;
i++;
} while (_identifiers.Contains(newId));
_identifiers.Add(newId);
return newId;
}
}
#endregion
//********************************************************************
//
// Protected Fields
//
//********************************************************************
#region Protected Fields
///
///
///
protected List _identifiers;
#endregion
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DocumentViewerConstants.cs
- DbConnectionPoolIdentity.cs
- Effect.cs
- LinearKeyFrames.cs
- DistributedTransactionPermission.cs
- ArgIterator.cs
- Material.cs
- StickyNoteAnnotations.cs
- BinaryNode.cs
- nulltextnavigator.cs
- ElementHostPropertyMap.cs
- XmlQuerySequence.cs
- DispatchChannelSink.cs
- SqlClientFactory.cs
- DataGridViewDataConnection.cs
- Constants.cs
- userdatakeys.cs
- ReaderWriterLockWrapper.cs
- DataServiceHostFactory.cs
- DataTableMappingCollection.cs
- CollectionViewGroup.cs
- ThreadAbortException.cs
- WizardForm.cs
- TableLayoutPanelBehavior.cs
- GeneralTransform3DCollection.cs
- MenuAdapter.cs
- _ProxyRegBlob.cs
- StrokeCollection.cs
- CaseExpr.cs
- WorkflowWebHostingModule.cs
- SafeSecurityHandles.cs
- TextTreeObjectNode.cs
- DialogResultConverter.cs
- CacheVirtualItemsEvent.cs
- ConfigurationFileMap.cs
- Menu.cs
- Int32AnimationUsingKeyFrames.cs
- SQLInt16.cs
- HttpModuleActionCollection.cs
- NullExtension.cs
- DuplicateWaitObjectException.cs
- GeneralTransform.cs
- OneToOneMappingSerializer.cs
- AdPostCacheSubstitution.cs
- SmiEventStream.cs
- StylusButton.cs
- ServerIdentity.cs
- NameTable.cs
- ScriptRegistrationManager.cs
- TreeNodeMouseHoverEvent.cs
- SocketSettings.cs
- WorkflowMarkupSerializationManager.cs
- ObjectItemAssemblyLoader.cs
- PageWrapper.cs
- RelationshipEnd.cs
- ReverseInheritProperty.cs
- KnownTypesHelper.cs
- MemberInfoSerializationHolder.cs
- SynchronizedMessageSource.cs
- SqlAliasesReferenced.cs
- AuthenticationModulesSection.cs
- SecurityIdentifierElement.cs
- WindowsPrincipal.cs
- ProbeMatchesMessageCD1.cs
- StringUtil.cs
- Paragraph.cs
- StructuralComparisons.cs
- Marshal.cs
- RemoteWebConfigurationHostServer.cs
- webeventbuffer.cs
- JapaneseLunisolarCalendar.cs
- SqlCrossApplyToCrossJoin.cs
- PeekCompletedEventArgs.cs
- BStrWrapper.cs
- ToolboxItemFilterAttribute.cs
- RoutedPropertyChangedEventArgs.cs
- TypeDependencyAttribute.cs
- SortDescriptionCollection.cs
- TdsParserSessionPool.cs
- SplitterCancelEvent.cs
- ListViewUpdatedEventArgs.cs
- mediaclock.cs
- WebDescriptionAttribute.cs
- URIFormatException.cs
- ConfigLoader.cs
- FlowLayoutSettings.cs
- DecoderNLS.cs
- ConnectorDragDropGlyph.cs
- ResourceAttributes.cs
- UseLicense.cs
- OracleConnectionStringBuilder.cs
- SerialPort.cs
- SHA512Managed.cs
- ContentElementAutomationPeer.cs
- ChannelManager.cs
- CreateUserWizard.cs
- ArrayEditor.cs
- MessageQueuePermissionEntryCollection.cs
- CompositeFontFamily.cs
- ResourceProperty.cs