Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / 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. // //----------------------------------------------------------------- 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EventWaitHandle.cs
- XmlParser.cs
- WeakEventManager.cs
- EFTableProvider.cs
- DataControlHelper.cs
- ToolConsole.cs
- GatewayIPAddressInformationCollection.cs
- EventSetter.cs
- CriticalHandle.cs
- PriorityChain.cs
- TextBoxLine.cs
- TextPointerBase.cs
- OleDbTransaction.cs
- UseAttributeSetsAction.cs
- InputReferenceExpression.cs
- ComAdminWrapper.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- EngineSiteSapi.cs
- SerTrace.cs
- ParameterModifier.cs
- CompiledXpathExpr.cs
- OuterGlowBitmapEffect.cs
- SoapFormatter.cs
- _ShellExpression.cs
- IHttpResponseInternal.cs
- SmiContextFactory.cs
- ScalarType.cs
- ZipIOFileItemStream.cs
- Synchronization.cs
- XmlSchemaAppInfo.cs
- CompilerErrorCollection.cs
- ReflectionServiceProvider.cs
- DoWhileDesigner.xaml.cs
- SqlDelegatedTransaction.cs
- FileUtil.cs
- _SslSessionsCache.cs
- FormParameter.cs
- StringSorter.cs
- WebUtil.cs
- ChannelFactory.cs
- ApplicationId.cs
- CharAnimationBase.cs
- BmpBitmapEncoder.cs
- WeakReference.cs
- EdmConstants.cs
- StagingAreaInputItem.cs
- EtwTrackingBehaviorElement.cs
- StateDesignerConnector.cs
- SymmetricCryptoHandle.cs
- WebPartTransformerAttribute.cs
- TreeIterators.cs
- Typeface.cs
- ModuleElement.cs
- CriticalExceptions.cs
- LiteralLink.cs
- SqlError.cs
- StringSource.cs
- MarginsConverter.cs
- PlaceHolder.cs
- LocatorBase.cs
- CodeAccessSecurityEngine.cs
- AuthStoreRoleProvider.cs
- ScriptResourceHandler.cs
- PixelFormat.cs
- DataKeyCollection.cs
- NullableDoubleAverageAggregationOperator.cs
- DummyDataSource.cs
- Debug.cs
- HostingEnvironment.cs
- AsyncOperation.cs
- ScaleTransform3D.cs
- Overlapped.cs
- _HeaderInfo.cs
- wgx_commands.cs
- Graph.cs
- VerificationAttribute.cs
- PageCatalogPart.cs
- RuntimeUtils.cs
- invalidudtexception.cs
- IPipelineRuntime.cs
- ControlAdapter.cs
- ProcessInfo.cs
- DoubleLinkListEnumerator.cs
- ExpandCollapseIsCheckedConverter.cs
- FileSystemWatcher.cs
- ModuleElement.cs
- Events.cs
- CompositeScriptReferenceEventArgs.cs
- InkCanvasSelection.cs
- LogicalExpressionEditor.cs
- WebBrowserUriTypeConverter.cs
- BitmapEffectInput.cs
- CqlIdentifiers.cs
- PrimitiveSchema.cs
- CompilerResults.cs
- SchemaTypeEmitter.cs
- TextAction.cs
- FileDialog_Vista.cs
- ReflectEventDescriptor.cs
- BamlLocalizableResource.cs