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
- ThreadStartException.cs
- Quaternion.cs
- ExternalException.cs
- SecurityToken.cs
- NameValueConfigurationCollection.cs
- DataGridViewIntLinkedList.cs
- AsyncOperationContext.cs
- ExtractorMetadata.cs
- AnnotationStore.cs
- StateManagedCollection.cs
- HttpCachePolicy.cs
- MissingMemberException.cs
- SqlDataSourceFilteringEventArgs.cs
- FormsAuthenticationUserCollection.cs
- JoinQueryOperator.cs
- Help.cs
- DbMetaDataColumnNames.cs
- DetailsViewRowCollection.cs
- ExceptionUtil.cs
- SqlDataAdapter.cs
- HwndProxyElementProvider.cs
- SplitContainer.cs
- ILGen.cs
- ResourceDisplayNameAttribute.cs
- DependencyObjectType.cs
- TextInfo.cs
- InternalMappingException.cs
- QueryRewriter.cs
- DBSchemaTable.cs
- RequestCache.cs
- SafeRightsManagementHandle.cs
- DeviceOverridableAttribute.cs
- WebPartDisplayMode.cs
- AutoGeneratedField.cs
- ValidatorCompatibilityHelper.cs
- NonBatchDirectoryCompiler.cs
- RequestCacheManager.cs
- Triplet.cs
- coordinator.cs
- SimpleRecyclingCache.cs
- CssStyleCollection.cs
- WebControl.cs
- SQLStringStorage.cs
- XmlSerializerVersionAttribute.cs
- ZipIOCentralDirectoryFileHeader.cs
- IFlowDocumentViewer.cs
- StrokeRenderer.cs
- Synchronization.cs
- TabRenderer.cs
- Odbc32.cs
- ListView.cs
- CodeTypeDelegate.cs
- WindowsStatic.cs
- SafeNativeMethods.cs
- httpapplicationstate.cs
- ClientTarget.cs
- DataPointer.cs
- WizardPanel.cs
- PixelShader.cs
- RegisteredDisposeScript.cs
- SystemIPv4InterfaceProperties.cs
- Socket.cs
- TextEditorContextMenu.cs
- ObjectStorage.cs
- CollectionBuilder.cs
- RepeaterItemEventArgs.cs
- ManagementOperationWatcher.cs
- TagPrefixCollection.cs
- HotSpot.cs
- TableLayoutRowStyleCollection.cs
- StringInfo.cs
- DispatcherHookEventArgs.cs
- ReverseInheritProperty.cs
- RequestDescription.cs
- TimeSpanMinutesConverter.cs
- CompiledRegexRunner.cs
- InputLanguageProfileNotifySink.cs
- LinearQuaternionKeyFrame.cs
- DataBindEngine.cs
- OrderingExpression.cs
- DeviceContext.cs
- ColorAnimation.cs
- SoapHeaderAttribute.cs
- SiteMapDataSourceView.cs
- PrinterSettings.cs
- WriteTimeStream.cs
- WebConfigurationManager.cs
- Point3DCollection.cs
- ItemsPanelTemplate.cs
- ServiceInfo.cs
- ComEventsMethod.cs
- HandoffBehavior.cs
- QueryLifecycle.cs
- UITypeEditor.cs
- Exceptions.cs
- InstanceHandleReference.cs
- TextClipboardData.cs
- BamlWriter.cs
- WebEventCodes.cs
- DataGridViewImageCell.cs