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
- EdmSchemaError.cs
- GlyphCollection.cs
- SQLInt16.cs
- ProcessHost.cs
- Automation.cs
- NetworkAddressChange.cs
- FormViewRow.cs
- UIntPtr.cs
- MenuBindingsEditor.cs
- HttpRequestTraceRecord.cs
- GreenMethods.cs
- TraceListeners.cs
- ListBindingConverter.cs
- NavigationFailedEventArgs.cs
- NativeMethodsOther.cs
- BookmarkScopeInfo.cs
- PropertyGridView.cs
- EmptyQuery.cs
- InlineObject.cs
- DBNull.cs
- ChainOfDependencies.cs
- SystemIcons.cs
- Point3DCollectionConverter.cs
- ToolTipAutomationPeer.cs
- PageAdapter.cs
- WebPartTransformerAttribute.cs
- CertificateManager.cs
- CodeIterationStatement.cs
- _HTTPDateParse.cs
- NotifyIcon.cs
- EntitySetDataBindingList.cs
- _FtpControlStream.cs
- Int64.cs
- TextPointerBase.cs
- Encoder.cs
- ToolStripItemGlyph.cs
- MenuItemCollectionEditor.cs
- AttributeQuery.cs
- ConfigurationErrorsException.cs
- Menu.cs
- Vector3DAnimationBase.cs
- DependencyObjectPropertyDescriptor.cs
- ZipPackage.cs
- ObjectTypeMapping.cs
- XmlSchemaValidationException.cs
- SizeAnimationUsingKeyFrames.cs
- Site.cs
- BaseValidator.cs
- Panel.cs
- TransactedReceiveData.cs
- EmptyImpersonationContext.cs
- UniqueCodeIdentifierScope.cs
- CommonDialog.cs
- ObjectStateEntry.cs
- ToolstripProfessionalRenderer.cs
- IsolatedStorageException.cs
- AssemblyBuilder.cs
- DocumentsTrace.cs
- SiteMapDataSourceView.cs
- DataGridViewLinkColumn.cs
- CryptoApi.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- ColorIndependentAnimationStorage.cs
- SafeHandle.cs
- ProgressBarAutomationPeer.cs
- PropertyEmitterBase.cs
- CodeStatement.cs
- ToolStripContentPanelDesigner.cs
- OptionalColumn.cs
- DataSetMappper.cs
- SmtpSection.cs
- basecomparevalidator.cs
- DocumentsTrace.cs
- RepeaterCommandEventArgs.cs
- LambdaSerializationException.cs
- HttpEncoderUtility.cs
- RuleAttributes.cs
- InkCanvas.cs
- OutputCacheModule.cs
- CompilationSection.cs
- BasePattern.cs
- ChannelSinkStacks.cs
- SplashScreen.cs
- FieldNameLookup.cs
- TcpConnectionPoolSettingsElement.cs
- UMPAttributes.cs
- PlaceHolder.cs
- _ConnectionGroup.cs
- DefaultPropertiesToSend.cs
- InterleavedZipPartStream.cs
- BindingWorker.cs
- DocumentApplicationState.cs
- NumberAction.cs
- ZipIORawDataFileBlock.cs
- StrongNamePublicKeyBlob.cs
- TextDecorationUnitValidation.cs
- XmlSchemaCollection.cs
- Resources.Designer.cs
- HttpWebResponse.cs
- DrawingAttributeSerializer.cs