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
- ToolboxComponentsCreatingEventArgs.cs
- AttachmentCollection.cs
- SimpleWorkerRequest.cs
- ExtensionFile.cs
- AddInController.cs
- PolicyManager.cs
- MultilineStringConverter.cs
- Axis.cs
- XmlReflectionImporter.cs
- Assembly.cs
- ListView.cs
- VerificationAttribute.cs
- Renderer.cs
- RegistrationServices.cs
- ArcSegment.cs
- RuleAction.cs
- StylusCollection.cs
- BitmapSource.cs
- EncryptedPackage.cs
- PropertyInfo.cs
- xdrvalidator.cs
- RadioButtonList.cs
- DbMetaDataCollectionNames.cs
- NetworkInterface.cs
- StartUpEventArgs.cs
- TypeDependencyAttribute.cs
- CounterSample.cs
- BatchParser.cs
- SystemInformation.cs
- XmlSchemaSequence.cs
- Predicate.cs
- ClientOptions.cs
- TreeViewImageGenerator.cs
- TrustLevel.cs
- ColumnReorderedEventArgs.cs
- InputMethodStateTypeInfo.cs
- COM2PictureConverter.cs
- ComponentResourceManager.cs
- Pen.cs
- ComponentTray.cs
- DrawingGroup.cs
- ConditionCollection.cs
- StyleCollectionEditor.cs
- BCryptNative.cs
- NavigationPropertyEmitter.cs
- DataBoundControlActionList.cs
- Timeline.cs
- Attribute.cs
- FormViewRow.cs
- MemoryMappedViewAccessor.cs
- COM2ColorConverter.cs
- TreeNodeClickEventArgs.cs
- SqlCacheDependencyDatabaseCollection.cs
- QueryRewriter.cs
- ControlsConfig.cs
- ErrorRuntimeConfig.cs
- InvalidCastException.cs
- XmlSchemaComplexContent.cs
- WebPartExportVerb.cs
- FixedSOMTable.cs
- FileRegion.cs
- SQLCharsStorage.cs
- backend.cs
- StringUtil.cs
- BoundField.cs
- CalendarDesigner.cs
- OutputCacheSettingsSection.cs
- NativeObjectSecurity.cs
- UnorderedHashRepartitionStream.cs
- GetPolicyDetailsRequest.cs
- HashSet.cs
- HashSetDebugView.cs
- QilTernary.cs
- DesignerHelpers.cs
- TimeSpan.cs
- DependencyPropertyAttribute.cs
- DataViewSettingCollection.cs
- SecurityPermission.cs
- HttpRuntime.cs
- SchemaTypeEmitter.cs
- AsyncWaitHandle.cs
- PrePostDescendentsWalker.cs
- PrintPreviewGraphics.cs
- RuleSetCollection.cs
- SqlFactory.cs
- URLBuilder.cs
- ManualResetEvent.cs
- Model3D.cs
- SamlConstants.cs
- PolyLineSegmentFigureLogic.cs
- ColorEditor.cs
- UnmanagedMemoryAccessor.cs
- NameValueFileSectionHandler.cs
- Form.cs
- KnownTypes.cs
- ConfigurationElementCollection.cs
- MachineKeyConverter.cs
- PixelFormat.cs
- SequentialUshortCollection.cs
- DataGridViewImageCell.cs