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
- ModuleElement.cs
- SpecialFolderEnumConverter.cs
- WriteFileContext.cs
- RegistryDataKey.cs
- FromRequest.cs
- Decorator.cs
- Baml2006ReaderContext.cs
- ResourceDictionary.cs
- Zone.cs
- QuaternionRotation3D.cs
- BezierSegment.cs
- CollectionAdapters.cs
- FacetValues.cs
- GeneralTransform3D.cs
- TdsEnums.cs
- XmlSchemaExternal.cs
- DataServiceContext.cs
- ElementHost.cs
- ListManagerBindingsCollection.cs
- EnumConverter.cs
- TransformerTypeCollection.cs
- xml.cs
- ObjectDisposedException.cs
- OleDbCommand.cs
- MembershipUser.cs
- EntityDataSourceChangedEventArgs.cs
- DesignerValidationSummaryAdapter.cs
- OleDbMetaDataFactory.cs
- ArgumentFixer.cs
- EllipticalNodeOperations.cs
- GenericUriParser.cs
- Splitter.cs
- RadioButtonRenderer.cs
- PropertyValue.cs
- CodeExpressionCollection.cs
- ToolStripSeparatorRenderEventArgs.cs
- ObjectView.cs
- CaretElement.cs
- BulletedListEventArgs.cs
- IDQuery.cs
- XmlException.cs
- AttachedPropertyMethodSelector.cs
- XmlTextReaderImplHelpers.cs
- EntityDataSourceWrapper.cs
- Cursor.cs
- VirtualPathUtility.cs
- TextEditorContextMenu.cs
- SharedPersonalizationStateInfo.cs
- UnsafeNativeMethods.cs
- ComboBoxAutomationPeer.cs
- WebPartRestoreVerb.cs
- precedingquery.cs
- ClientSession.cs
- ApplicationServiceHelper.cs
- DbDataReader.cs
- HandleCollector.cs
- ColumnCollection.cs
- BatchParser.cs
- ObjectParameter.cs
- StyleSheetDesigner.cs
- EventRoute.cs
- SystemIPInterfaceProperties.cs
- JoinElimination.cs
- AssemblyLoader.cs
- VirtualPathUtility.cs
- regiisutil.cs
- UidManager.cs
- InternalResources.cs
- OracleBFile.cs
- DataObjectSettingDataEventArgs.cs
- DetailsViewRowCollection.cs
- ToolStripOverflowButton.cs
- HitTestFilterBehavior.cs
- TypeBuilder.cs
- SqlServices.cs
- CodeTypeOfExpression.cs
- ToolStripSplitButton.cs
- MetadataUtilsSmi.cs
- HandlerWithFactory.cs
- UrlMappingCollection.cs
- WindowsFormsSectionHandler.cs
- QualifierSet.cs
- MouseGestureConverter.cs
- SerTrace.cs
- WebZone.cs
- CacheOutputQuery.cs
- DataBinder.cs
- ObjectStateManagerMetadata.cs
- SecurityDocument.cs
- ListViewGroupConverter.cs
- AccessedThroughPropertyAttribute.cs
- Constants.cs
- HttpDebugHandler.cs
- ToolBarButtonClickEvent.cs
- FileDataSourceCache.cs
- InheritanceContextChangedEventManager.cs
- ProfilePropertySettingsCollection.cs
- PersonalizationProviderHelper.cs
- Exceptions.cs
- GroupByQueryOperator.cs