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
- URLMembershipCondition.cs
- PocoEntityKeyStrategy.cs
- HttpProfileGroupBase.cs
- ResetableIterator.cs
- UpdatePanelControlTrigger.cs
- XmlSchemaObject.cs
- RectAnimation.cs
- ObjectStateEntry.cs
- EventData.cs
- InstanceDescriptor.cs
- DataListCommandEventArgs.cs
- PtsHelper.cs
- ToolstripProfessionalRenderer.cs
- HttpModuleAction.cs
- Padding.cs
- PartialCachingControl.cs
- CngProvider.cs
- HtmlTableRowCollection.cs
- XmlQueryContext.cs
- TempFiles.cs
- SerializableReadOnlyDictionary.cs
- DateTimeUtil.cs
- KeyValuePair.cs
- IBuiltInEvidence.cs
- ViewLoader.cs
- BinaryWriter.cs
- XmlCharCheckingWriter.cs
- XamlPathDataSerializer.cs
- ImpersonateTokenRef.cs
- StatusBarPanel.cs
- Debugger.cs
- OleDbDataReader.cs
- BamlLocalizabilityResolver.cs
- NameTable.cs
- ParseElement.cs
- dtdvalidator.cs
- UnsafeNativeMethodsMilCoreApi.cs
- AmbientValueAttribute.cs
- AnnotationAdorner.cs
- ValueHandle.cs
- LayoutEvent.cs
- TextEditor.cs
- ManifestSignedXml.cs
- HandledEventArgs.cs
- DataGridColumnFloatingHeader.cs
- EventSinkHelperWriter.cs
- PasswordPropertyTextAttribute.cs
- XmlILConstructAnalyzer.cs
- CheckBoxFlatAdapter.cs
- URLAttribute.cs
- XmlTextReaderImplHelpers.cs
- XmlArrayItemAttributes.cs
- ContentPathSegment.cs
- XmlSchemaInferenceException.cs
- CompiledRegexRunner.cs
- Lease.cs
- URI.cs
- ScrollItemProviderWrapper.cs
- NativeMethods.cs
- AppDomainGrammarProxy.cs
- EUCJPEncoding.cs
- Unit.cs
- ListMarkerLine.cs
- PageCodeDomTreeGenerator.cs
- Convert.cs
- ListViewGroupItemCollection.cs
- __Error.cs
- PopOutPanel.cs
- ScrollViewerAutomationPeer.cs
- PolyBezierSegmentFigureLogic.cs
- ClientSettings.cs
- ColumnResizeAdorner.cs
- PropertyInformationCollection.cs
- CaseStatement.cs
- InvalidPrinterException.cs
- TraceSection.cs
- RSAProtectedConfigurationProvider.cs
- BooleanExpr.cs
- ReadOnlyDictionary.cs
- IpcPort.cs
- XmlArrayAttribute.cs
- ProgressChangedEventArgs.cs
- KnownColorTable.cs
- DragStartedEventArgs.cs
- DataControlCommands.cs
- DesignerOptionService.cs
- Style.cs
- CodeTypeReference.cs
- BuildProvider.cs
- XmlMembersMapping.cs
- BindingSource.cs
- MsmqTransportReceiveParameters.cs
- ArrayTypeMismatchException.cs
- ResourcePool.cs
- StylusLogic.cs
- RouteParser.cs
- WebServiceTypeData.cs
- WarningException.cs
- CommonBehaviorsSection.cs
- RSACryptoServiceProvider.cs