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
- SourceLineInfo.cs
- MessagePartDescriptionCollection.cs
- AccessKeyManager.cs
- TCPClient.cs
- CanonicalizationDriver.cs
- SerializerWriterEventHandlers.cs
- ConfigXmlAttribute.cs
- DataSet.cs
- XmlQueryStaticData.cs
- ExtendedPropertyDescriptor.cs
- Point4DConverter.cs
- CodeSnippetExpression.cs
- MembershipValidatePasswordEventArgs.cs
- COMException.cs
- CodeDirectiveCollection.cs
- TransformedBitmap.cs
- RuntimeCompatibilityAttribute.cs
- SystemParameters.cs
- ToolStripTemplateNode.cs
- ClientBuildManagerTypeDescriptionProviderBridge.cs
- QueueProcessor.cs
- XmlConverter.cs
- Serializer.cs
- StringCollection.cs
- GlobalItem.cs
- PageBreakRecord.cs
- AsyncOperation.cs
- ModuleBuilder.cs
- TempFiles.cs
- KnownBoxes.cs
- DictionaryKeyPropertyAttribute.cs
- MasterPageCodeDomTreeGenerator.cs
- Debugger.cs
- DataGridLinkButton.cs
- ObjectNavigationPropertyMapping.cs
- DocumentCollection.cs
- XmlSchemaComplexContentExtension.cs
- InternalsVisibleToAttribute.cs
- SafeNativeMethods.cs
- ZeroOpNode.cs
- ToolStripDropDownDesigner.cs
- DateTimePickerDesigner.cs
- NotImplementedException.cs
- Manipulation.cs
- DataSourceXmlSerializationAttribute.cs
- ControlCommandSet.cs
- Automation.cs
- TimeManager.cs
- TypeSchema.cs
- ConfigurationElementCollection.cs
- ISessionStateStore.cs
- HttpModule.cs
- StrokeIntersection.cs
- ListSortDescription.cs
- SignatureDescription.cs
- Identity.cs
- SliderAutomationPeer.cs
- PaperSource.cs
- FontUnitConverter.cs
- FilterableAttribute.cs
- CaseExpr.cs
- OracleParameterBinding.cs
- DataGridCellAutomationPeer.cs
- DrawListViewColumnHeaderEventArgs.cs
- DataMisalignedException.cs
- XmlReader.cs
- EventLogConfiguration.cs
- SignatureDescription.cs
- DataGridDesigner.cs
- SystemColorTracker.cs
- OrCondition.cs
- LinkAreaEditor.cs
- CellQuery.cs
- EventMap.cs
- MatrixAnimationUsingPath.cs
- DataSourceXmlTextReader.cs
- SqlFlattener.cs
- XmlSiteMapProvider.cs
- IdleTimeoutMonitor.cs
- InlineUIContainer.cs
- ComponentCommands.cs
- DirectoryRedirect.cs
- WebBrowsableAttribute.cs
- BindingGroup.cs
- ParserHooks.cs
- StrongNameIdentityPermission.cs
- FileEnumerator.cs
- ValidationSummary.cs
- StylusPointPropertyUnit.cs
- HorizontalAlignConverter.cs
- DataListAutoFormat.cs
- SubqueryTrackingVisitor.cs
- Popup.cs
- DisplayNameAttribute.cs
- PropertyMapper.cs
- SQlBooleanStorage.cs
- TypeValidationEventArgs.cs
- ComplexType.cs
- ServiceNameElement.cs
- ellipse.cs