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
- ETagAttribute.cs
- StringExpressionSet.cs
- ProxyHwnd.cs
- XmlSchemaIdentityConstraint.cs
- LiteralText.cs
- MSAAWinEventWrap.cs
- Pair.cs
- SessionStateSection.cs
- SerTrace.cs
- Rotation3DAnimationBase.cs
- FileSecurity.cs
- BatchParser.cs
- MonthChangedEventArgs.cs
- BooleanFunctions.cs
- CreateParams.cs
- Transform3DGroup.cs
- EncoderParameters.cs
- UntypedNullExpression.cs
- ArgIterator.cs
- ThemeDictionaryExtension.cs
- BinaryCommonClasses.cs
- ConnectionManagementElement.cs
- IODescriptionAttribute.cs
- CustomSignedXml.cs
- HttpCookieCollection.cs
- SmiEventSink_Default.cs
- EmbeddedMailObjectsCollection.cs
- PersistChildrenAttribute.cs
- sitestring.cs
- WebControlsSection.cs
- objectresult_tresulttype.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- AudioFormatConverter.cs
- RotateTransform3D.cs
- MiniAssembly.cs
- ProviderBase.cs
- ValidationPropertyAttribute.cs
- TcpConnectionPoolSettingsElement.cs
- TdsParserHelperClasses.cs
- DupHandleConnectionReader.cs
- DefaultPropertyAttribute.cs
- SchemaManager.cs
- Soap.cs
- _ProxyRegBlob.cs
- ZipIOLocalFileBlock.cs
- ReadOnlyCollection.cs
- CngKey.cs
- FullTextState.cs
- WebPartAuthorizationEventArgs.cs
- ProfileInfo.cs
- HttpModulesSection.cs
- Schema.cs
- DoubleMinMaxAggregationOperator.cs
- HttpCapabilitiesSectionHandler.cs
- DbProviderFactory.cs
- AttachedPropertiesService.cs
- StdValidatorsAndConverters.cs
- Monitor.cs
- ReliabilityContractAttribute.cs
- Pool.cs
- Literal.cs
- XmlRawWriterWrapper.cs
- HttpListenerContext.cs
- IconHelper.cs
- JumpPath.cs
- RootBrowserWindow.cs
- SessionStateContainer.cs
- Opcode.cs
- WebConvert.cs
- PersianCalendar.cs
- ServiceAuthorizationManager.cs
- ActivitiesCollection.cs
- DocumentAutomationPeer.cs
- ImageIndexConverter.cs
- Tablet.cs
- PreviewKeyDownEventArgs.cs
- ImageSourceConverter.cs
- CallSite.cs
- ResourceDisplayNameAttribute.cs
- LicFileLicenseProvider.cs
- AdCreatedEventArgs.cs
- XmlSignatureManifest.cs
- DbDataReader.cs
- NamespaceListProperty.cs
- DataServiceResponse.cs
- GroupBoxAutomationPeer.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- QuarticEase.cs
- ExceptionUtility.cs
- ConfigurationLoader.cs
- Label.cs
- Boolean.cs
- XMLDiffLoader.cs
- ArgumentException.cs
- ToolZone.cs
- InternalConfigSettingsFactory.cs
- FigureHelper.cs
- GPStream.cs
- WebColorConverter.cs
- CatalogZone.cs