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
- UnsafeNativeMethods.cs
- IProducerConsumerCollection.cs
- ScrollProperties.cs
- ClipboardData.cs
- TextEffect.cs
- DesignerOptions.cs
- EventProviderWriter.cs
- HttpModuleActionCollection.cs
- SrgsText.cs
- SqlConnectionManager.cs
- SqlConnectionHelper.cs
- PriorityItem.cs
- UITypeEditor.cs
- UnmanagedMemoryAccessor.cs
- NetworkInformationPermission.cs
- MetadataUtil.cs
- TextBoxLine.cs
- ApplicationDirectoryMembershipCondition.cs
- OdbcParameter.cs
- AssemblyHelper.cs
- Bookmark.cs
- XPathException.cs
- PropertyKey.cs
- MultiAsyncResult.cs
- HtmlDocument.cs
- Renderer.cs
- SqlCharStream.cs
- CapabilitiesRule.cs
- DashStyle.cs
- IsolatedStorage.cs
- StickyNoteContentControl.cs
- GetChildSubtree.cs
- ElementHostAutomationPeer.cs
- HighContrastHelper.cs
- ExecutionEngineException.cs
- ToolStripProgressBar.cs
- recordstate.cs
- PerformanceCounterCategory.cs
- TypeReference.cs
- ReturnType.cs
- RubberbandSelector.cs
- EventLogPermissionEntryCollection.cs
- DecoderBestFitFallback.cs
- NamespaceQuery.cs
- DesignerObject.cs
- ConnectionStringsSection.cs
- DebugView.cs
- SortQueryOperator.cs
- XMLSyntaxException.cs
- TemplatePartAttribute.cs
- XPathMessageFilterElement.cs
- StrongName.cs
- TypedTableBase.cs
- RoutedEventHandlerInfo.cs
- DictionaryEntry.cs
- FreezableDefaultValueFactory.cs
- HeaderCollection.cs
- WebPartConnectionsCancelEventArgs.cs
- Transform.cs
- LineInfo.cs
- ConfigXmlReader.cs
- DefinitionUpdate.cs
- XmlCharacterData.cs
- RuntimeArgumentHandle.cs
- FontResourceCache.cs
- CriticalFinalizerObject.cs
- XsdValidatingReader.cs
- CommandField.cs
- SyndicationFeed.cs
- CompositeCollection.cs
- _TransmitFileOverlappedAsyncResult.cs
- UriExt.cs
- EastAsianLunisolarCalendar.cs
- TypeUtil.cs
- TheQuery.cs
- Condition.cs
- SchemaMapping.cs
- ExternalDataExchangeClient.cs
- CollectionViewSource.cs
- InitializationEventAttribute.cs
- AssociationSetEnd.cs
- Documentation.cs
- ObjectToIdCache.cs
- CoreChannel.cs
- DocumentViewerConstants.cs
- X509Utils.cs
- HttpCachePolicyElement.cs
- SplashScreenNativeMethods.cs
- DecimalConverter.cs
- WebBrowserPermission.cs
- DbFunctionCommandTree.cs
- METAHEADER.cs
- ObjectAnimationUsingKeyFrames.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- COM2ExtendedBrowsingHandler.cs
- KeyEvent.cs
- AtomMaterializerLog.cs
- AspCompat.cs
- LinkedResourceCollection.cs
- GradientStop.cs