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
- SystemIPInterfaceStatistics.cs
- BulletChrome.cs
- RowParagraph.cs
- PropertyEntry.cs
- GridSplitterAutomationPeer.cs
- TabRenderer.cs
- SizeF.cs
- SiteOfOriginContainer.cs
- AttachmentService.cs
- connectionpool.cs
- Debug.cs
- TextEffect.cs
- ObjectSet.cs
- CharEntityEncoderFallback.cs
- OdbcCommand.cs
- BindingGraph.cs
- _NegoStream.cs
- EventHandlerList.cs
- XmlCountingReader.cs
- Itemizer.cs
- XmlUtf8RawTextWriter.cs
- SapiRecoContext.cs
- SortDescriptionCollection.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- SqlDependencyListener.cs
- AnnotationAdorner.cs
- StrokeNodeData.cs
- BaseTemplateBuildProvider.cs
- XmlTypeMapping.cs
- XmlDocument.cs
- SafeSecurityHelper.cs
- AuthenticationConfig.cs
- ConsoleCancelEventArgs.cs
- StandardRuntimeEnumValidatorAttribute.cs
- COM2PropertyBuilderUITypeEditor.cs
- WebPartDisplayModeEventArgs.cs
- ProfileManager.cs
- DrawingAttributeSerializer.cs
- SqlUDTStorage.cs
- CommandConverter.cs
- BinaryUtilClasses.cs
- Preprocessor.cs
- ExpressionEvaluator.cs
- PrefixQName.cs
- WebControlAdapter.cs
- MemberListBinding.cs
- Page.cs
- SqlCacheDependencyDatabaseCollection.cs
- TransactionChannel.cs
- RequiredFieldValidator.cs
- TemplateInstanceAttribute.cs
- SqlTriggerContext.cs
- PartialCachingControl.cs
- ObjectConverter.cs
- StateMachineHistory.cs
- _NetworkingPerfCounters.cs
- DependencyObjectProvider.cs
- XmlWrappingReader.cs
- GroupBox.cs
- WebBrowserContainer.cs
- XmlElementAttributes.cs
- Viewport2DVisual3D.cs
- BuildManagerHost.cs
- Attributes.cs
- RuntimeTransactionHandle.cs
- Int64Animation.cs
- DesignDataSource.cs
- DocumentXmlWriter.cs
- NonBatchDirectoryCompiler.cs
- PeerToPeerException.cs
- SqlClientFactory.cs
- COM2ExtendedBrowsingHandler.cs
- Empty.cs
- HtmlTernaryTree.cs
- RegularExpressionValidator.cs
- ItemType.cs
- TemplateControl.cs
- ParserContext.cs
- Baml2006ReaderFrame.cs
- PageRequestManager.cs
- XmlArrayItemAttribute.cs
- XmlSchemaObjectCollection.cs
- DelegateSerializationHolder.cs
- InputScope.cs
- ButtonFlatAdapter.cs
- VariableQuery.cs
- NumberSubstitution.cs
- Ipv6Element.cs
- PagesSection.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- SqlComparer.cs
- ResourceContainer.cs
- BamlLocalizationDictionary.cs
- AttachedPropertyBrowsableAttribute.cs
- SubpageParagraph.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- CodeTypeDeclaration.cs
- ConfigurationManagerHelper.cs
- FixedStringLookup.cs
- UpdateCompiler.cs