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
- TemplateControlCodeDomTreeGenerator.cs
- _DigestClient.cs
- EntityParameter.cs
- SQLGuid.cs
- GorillaCodec.cs
- Material.cs
- XmlILAnnotation.cs
- SqlDataSourceFilteringEventArgs.cs
- XmlWriterSettings.cs
- NonVisualControlAttribute.cs
- ProgressBarRenderer.cs
- InkSerializer.cs
- RuleInfoComparer.cs
- ContentDisposition.cs
- GrammarBuilderWildcard.cs
- MethodSet.cs
- ProviderMetadataCachedInformation.cs
- LinqDataSourceInsertEventArgs.cs
- TdsValueSetter.cs
- DataGridViewMethods.cs
- WindowsListViewItemStartMenu.cs
- LeafCellTreeNode.cs
- BamlBinaryWriter.cs
- _BufferOffsetSize.cs
- ActivityTypeDesigner.xaml.cs
- PersonalizableAttribute.cs
- DesignerTransaction.cs
- Button.cs
- CompilerErrorCollection.cs
- UnSafeCharBuffer.cs
- XmlSchemaRedefine.cs
- DragDrop.cs
- ScrollBarAutomationPeer.cs
- C14NUtil.cs
- arabicshape.cs
- _SingleItemRequestCache.cs
- ToolStripDropDownItem.cs
- CannotUnloadAppDomainException.cs
- HttpProfileGroupBase.cs
- ToolboxItemWrapper.cs
- SinglePageViewer.cs
- ClickablePoint.cs
- XsdValidatingReader.cs
- BamlRecords.cs
- MachineKeySection.cs
- CommandValueSerializer.cs
- RewritingProcessor.cs
- MailMessageEventArgs.cs
- TcpStreams.cs
- ModelVisual3D.cs
- CodeLinePragma.cs
- PathFigureCollection.cs
- ValidationResults.cs
- ThemeableAttribute.cs
- ButtonBase.cs
- Int16AnimationBase.cs
- FixedTextSelectionProcessor.cs
- SmiTypedGetterSetter.cs
- CmsInterop.cs
- BamlResourceContent.cs
- SqlReferenceCollection.cs
- TypedReference.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- PingReply.cs
- MyContact.cs
- WebDescriptionAttribute.cs
- FontUnitConverter.cs
- SrgsElementFactory.cs
- GcHandle.cs
- Model3D.cs
- StylusLogic.cs
- HeaderUtility.cs
- SizeChangedEventArgs.cs
- DbResourceAllocator.cs
- StateItem.cs
- InputScopeConverter.cs
- TdsEnums.cs
- DeferrableContent.cs
- _ShellExpression.cs
- StringUtil.cs
- DrawingAttributes.cs
- SiteMapDesignerDataSourceView.cs
- SaveFileDialogDesigner.cs
- UpdateProgress.cs
- ManagedFilter.cs
- Event.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- LightweightCodeGenerator.cs
- RoleGroupCollection.cs
- ProgressBarAutomationPeer.cs
- _ShellExpression.cs
- HttpResponseInternalWrapper.cs
- counter.cs
- ImageUrlEditor.cs
- XmlSchemaSimpleType.cs
- IODescriptionAttribute.cs
- XmlText.cs
- ScriptControl.cs
- EmissiveMaterial.cs
- HttpCacheVary.cs