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
- DataGridViewHeaderCell.cs
- DataListCommandEventArgs.cs
- ColumnProvider.cs
- AppDomainProtocolHandler.cs
- MasterPageBuildProvider.cs
- EDesignUtil.cs
- XamlDesignerSerializationManager.cs
- TrustManagerMoreInformation.cs
- BlurBitmapEffect.cs
- EventHandlers.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- SQLInt16Storage.cs
- Stack.cs
- ImageFormat.cs
- ChangeDirector.cs
- webeventbuffer.cs
- QilName.cs
- CodeDelegateInvokeExpression.cs
- DataServiceProcessingPipelineEventArgs.cs
- contentDescriptor.cs
- CachedTypeface.cs
- CompositeDuplexBindingElement.cs
- DataListItemCollection.cs
- RSAPKCS1SignatureFormatter.cs
- WebPartConnectionsConfigureVerb.cs
- Convert.cs
- StructuralCache.cs
- XmlNodeChangedEventArgs.cs
- EditingMode.cs
- FixedTextContainer.cs
- SchemaNotation.cs
- AssociationSet.cs
- ScriptResourceAttribute.cs
- GeneralTransform3D.cs
- Documentation.cs
- webeventbuffer.cs
- DataGridViewCellStyleConverter.cs
- RadialGradientBrush.cs
- latinshape.cs
- Validator.cs
- Behavior.cs
- DataViewManager.cs
- ScalarConstant.cs
- DefinitionUpdate.cs
- ContentHostHelper.cs
- SqlEnums.cs
- DesignerLoader.cs
- ListViewHitTestInfo.cs
- SizeAnimation.cs
- TreeNodeCollection.cs
- XmlDictionaryReaderQuotas.cs
- HtmlImage.cs
- MouseEvent.cs
- XslCompiledTransform.cs
- StartUpEventArgs.cs
- SmtpCommands.cs
- PathFigureCollectionConverter.cs
- MobileResource.cs
- FormsAuthenticationEventArgs.cs
- ValueTypeFieldReference.cs
- ObjectStateManager.cs
- PointConverter.cs
- InternalCache.cs
- QilInvokeLateBound.cs
- ColorConverter.cs
- TextAdaptor.cs
- SpellerHighlightLayer.cs
- DataGridViewColumnStateChangedEventArgs.cs
- FixedSOMFixedBlock.cs
- DocumentPaginator.cs
- EUCJPEncoding.cs
- SqlDataAdapter.cs
- RuleDefinitions.cs
- CreateSequence.cs
- DomainUpDown.cs
- NeutralResourcesLanguageAttribute.cs
- PageCodeDomTreeGenerator.cs
- AnnotationMap.cs
- BindingValueChangedEventArgs.cs
- XmlLinkedNode.cs
- FontEmbeddingManager.cs
- NativeBuffer.cs
- PropertyChangingEventArgs.cs
- TriggerActionCollection.cs
- SettingsPropertyValue.cs
- IgnoreFileBuildProvider.cs
- DataGridCellInfo.cs
- IisNotInstalledException.cs
- DataContract.cs
- DataGridCell.cs
- IntAverageAggregationOperator.cs
- ELinqQueryState.cs
- ScaleTransform3D.cs
- ChooseAction.cs
- PageHandlerFactory.cs
- ConfigXmlCDataSection.cs
- MSG.cs
- QuotedPrintableStream.cs
- SafeCryptoKeyHandle.cs
- StateBag.cs