Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / 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
- ManipulationPivot.cs
- OleDbTransaction.cs
- CommonGetThemePartSize.cs
- QueryOperationResponseOfT.cs
- TreeNodeStyleCollection.cs
- ItemCheckedEvent.cs
- StringInfo.cs
- RelationshipDetailsRow.cs
- ObjectSelectorEditor.cs
- FixedFlowMap.cs
- ObjectCloneHelper.cs
- GeometryCollection.cs
- LoginName.cs
- PenContexts.cs
- DataGridColumn.cs
- AttachedPropertyBrowsableAttribute.cs
- SqlFactory.cs
- DifferencingCollection.cs
- entitydatasourceentitysetnameconverter.cs
- OverflowException.cs
- InnerItemCollectionView.cs
- IISUnsafeMethods.cs
- ObjectContext.cs
- CommandField.cs
- PersonalizationStateQuery.cs
- IdleTimeoutMonitor.cs
- FlowLayoutSettings.cs
- Convert.cs
- ImageMapEventArgs.cs
- ClientOptions.cs
- RandomNumberGenerator.cs
- Bits.cs
- MatrixValueSerializer.cs
- PackageDigitalSignatureManager.cs
- ObjectSecurity.cs
- DBParameter.cs
- LayoutManager.cs
- XmlDataImplementation.cs
- RemotingAttributes.cs
- RoleManagerModule.cs
- CodeSubDirectory.cs
- JsonFormatGeneratorStatics.cs
- ExtenderProvidedPropertyAttribute.cs
- WebPartDescription.cs
- WebColorConverter.cs
- SingleAnimationUsingKeyFrames.cs
- HttpProfileBase.cs
- ListViewItemEventArgs.cs
- SafeMILHandle.cs
- ToolboxItemCollection.cs
- HtmlInputButton.cs
- ServiceNameElement.cs
- HtmlTextArea.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- ExpressionStringBuilder.cs
- BindingManagerDataErrorEventArgs.cs
- OdbcEnvironment.cs
- SoapMessage.cs
- PlainXmlSerializer.cs
- FormClosingEvent.cs
- BaseValidator.cs
- Atom10FeedFormatter.cs
- SimpleHandlerBuildProvider.cs
- QueryOpeningEnumerator.cs
- QilGeneratorEnv.cs
- CommonDialog.cs
- ResourcePool.cs
- RenderingEventArgs.cs
- FormViewPagerRow.cs
- DynamicScriptObject.cs
- XmlSchemaCollection.cs
- AtlasWeb.Designer.cs
- HostDesigntimeLicenseContext.cs
- GridViewUpdateEventArgs.cs
- ComponentEditorForm.cs
- XpsTokenContext.cs
- DataGridToolTip.cs
- StorageModelBuildProvider.cs
- KeyboardNavigation.cs
- StrokeNode.cs
- CachedTypeface.cs
- BitmapCodecInfoInternal.cs
- QuerySelectOp.cs
- EdmValidator.cs
- ManagedIStream.cs
- X509IssuerSerialKeyIdentifierClause.cs
- NullableConverter.cs
- arabicshape.cs
- DataRelationCollection.cs
- Rfc4050KeyFormatter.cs
- Validator.cs
- XmlSchemaAttributeGroup.cs
- TransactionInformation.cs
- ClassData.cs
- CommandTreeTypeHelper.cs
- DataBindingExpressionBuilder.cs
- EditingContext.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- SHA256Cng.cs
- HtmlInputFile.cs