Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Speech / Src / Internal / GrammarBuilding / itemelement.cs / 1 / itemelement.cs
//------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------- using System.Collections.Generic; using System.Diagnostics; using System.Speech.Recognition; using System.Speech.Internal.SrgsParser; using System.Text; namespace System.Speech.Internal.GrammarBuilding { ////// /// #if VSCOMPILE [DebuggerDisplay ("{DebugSummary}")] #endif internal sealed class ItemElement : BuilderElements { //******************************************************************* // // Constructors // //******************************************************************* #region Constructors ////// /// /// internal ItemElement (GrammarBuilderBase builder) : this (builder, 1, 1) { } ////// /// /// /// internal ItemElement (int minRepeat, int maxRepeat) : this ((GrammarBuilderBase) null, minRepeat, maxRepeat) { } ////// /// /// /// /// internal ItemElement (GrammarBuilderBase builder, int minRepeat, int maxRepeat) { if (builder != null) { Add (builder); } _minRepeat = minRepeat; _maxRepeat = maxRepeat; } ////// /// /// /// /// internal ItemElement (Listbuilders, int minRepeat, int maxRepeat) { foreach (GrammarBuilderBase builder in builders) { Items.Add (builder); } _minRepeat = minRepeat; _maxRepeat = maxRepeat; } /// /// /// /// internal ItemElement (GrammarBuilder builders) { foreach (GrammarBuilderBase builder in builders.InternalBuilder.Items) { Items.Add (builder); } } #endregion //******************************************************************** // // Public Methods // //******************************************************************* #region Public Methods /// TODOC <_include file='doc\SpeechAudioFormatInfo.uex' path='docs/doc[@for="SpeechAudioFormatInfo.Equals"]/*' /> public override bool Equals (object obj) { ItemElement refObj = obj as ItemElement; if (refObj == null) { return false; } if (!base.Equals (obj)) { return false; } return _minRepeat == refObj._minRepeat && _maxRepeat == refObj._maxRepeat; } /// TODOC <_include file='doc\SpeechAudioFormatInfo.uex' path='docs/doc[@for="SpeechAudioFormatInfo.GetHashCode"]/*' /> public override int GetHashCode () { return base.GetHashCode (); } #endregion //******************************************************************** // // Internal Methods // //******************************************************************** #region Internal Methods ////// /// ///internal override GrammarBuilderBase Clone () { ItemElement item = new ItemElement (_minRepeat, _maxRepeat); item.CloneItems (this); return item; } /// /// /// /// /// /// /// ///internal override IElement CreateElement (IElementFactory elementFactory, IElement parent, IRule rule, IdentifierCollection ruleIds) { // Create and return the real item (the item including the grammar) // for the current grammar IItem item = elementFactory.CreateItem (parent, rule, _minRepeat, _maxRepeat, 0.5f, 1f); // Create the children elements CreateChildrenElements (elementFactory, item, rule, ruleIds); return item; } #endregion //******************************************************************* // // Private Fields // //******************************************************************** #region Private Fields private readonly int _minRepeat = 1; private readonly int _maxRepeat = 1; #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------- using System.Collections.Generic; using System.Diagnostics; using System.Speech.Recognition; using System.Speech.Internal.SrgsParser; using System.Text; namespace System.Speech.Internal.GrammarBuilding { ////// /// #if VSCOMPILE [DebuggerDisplay ("{DebugSummary}")] #endif internal sealed class ItemElement : BuilderElements { //******************************************************************* // // Constructors // //******************************************************************* #region Constructors ////// /// /// internal ItemElement (GrammarBuilderBase builder) : this (builder, 1, 1) { } ////// /// /// /// internal ItemElement (int minRepeat, int maxRepeat) : this ((GrammarBuilderBase) null, minRepeat, maxRepeat) { } ////// /// /// /// /// internal ItemElement (GrammarBuilderBase builder, int minRepeat, int maxRepeat) { if (builder != null) { Add (builder); } _minRepeat = minRepeat; _maxRepeat = maxRepeat; } ////// /// /// /// /// internal ItemElement (Listbuilders, int minRepeat, int maxRepeat) { foreach (GrammarBuilderBase builder in builders) { Items.Add (builder); } _minRepeat = minRepeat; _maxRepeat = maxRepeat; } /// /// /// /// internal ItemElement (GrammarBuilder builders) { foreach (GrammarBuilderBase builder in builders.InternalBuilder.Items) { Items.Add (builder); } } #endregion //******************************************************************** // // Public Methods // //******************************************************************* #region Public Methods /// TODOC <_include file='doc\SpeechAudioFormatInfo.uex' path='docs/doc[@for="SpeechAudioFormatInfo.Equals"]/*' /> public override bool Equals (object obj) { ItemElement refObj = obj as ItemElement; if (refObj == null) { return false; } if (!base.Equals (obj)) { return false; } return _minRepeat == refObj._minRepeat && _maxRepeat == refObj._maxRepeat; } /// TODOC <_include file='doc\SpeechAudioFormatInfo.uex' path='docs/doc[@for="SpeechAudioFormatInfo.GetHashCode"]/*' /> public override int GetHashCode () { return base.GetHashCode (); } #endregion //******************************************************************** // // Internal Methods // //******************************************************************** #region Internal Methods ////// /// ///internal override GrammarBuilderBase Clone () { ItemElement item = new ItemElement (_minRepeat, _maxRepeat); item.CloneItems (this); return item; } /// /// /// /// /// /// /// ///internal override IElement CreateElement (IElementFactory elementFactory, IElement parent, IRule rule, IdentifierCollection ruleIds) { // Create and return the real item (the item including the grammar) // for the current grammar IItem item = elementFactory.CreateItem (parent, rule, _minRepeat, _maxRepeat, 0.5f, 1f); // Create the children elements CreateChildrenElements (elementFactory, item, rule, ruleIds); return item; } #endregion //******************************************************************* // // Private Fields // //******************************************************************** #region Private Fields private readonly int _minRepeat = 1; private readonly int _maxRepeat = 1; #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
- TypeContext.cs
- TreeIterator.cs
- Command.cs
- FixedPageProcessor.cs
- CompareInfo.cs
- TreeView.cs
- ToolStripInSituService.cs
- CompressedStack.cs
- SecurityPolicySection.cs
- JsonSerializer.cs
- SafeRightsManagementQueryHandle.cs
- UrlRoutingModule.cs
- AudioDeviceOut.cs
- EnumValAlphaComparer.cs
- MeshGeometry3D.cs
- CodeTypeOfExpression.cs
- InternalBase.cs
- RawAppCommandInputReport.cs
- NetworkAddressChange.cs
- FrameDimension.cs
- TextBoxBase.cs
- SelfIssuedAuthProofToken.cs
- PerspectiveCamera.cs
- MethodMessage.cs
- MULTI_QI.cs
- EmptyControlCollection.cs
- GenericParameterDataContract.cs
- CancelRequestedRecord.cs
- FileInfo.cs
- DocumentViewerAutomationPeer.cs
- httpapplicationstate.cs
- ChannelServices.cs
- XmlQueryType.cs
- PlatformCulture.cs
- SafeFileMappingHandle.cs
- HtmlGenericControl.cs
- BaseCAMarshaler.cs
- IPCCacheManager.cs
- NativeMethods.cs
- ArrayExtension.cs
- columnmapkeybuilder.cs
- Int16KeyFrameCollection.cs
- VisualBrush.cs
- DocumentXPathNavigator.cs
- TriggerCollection.cs
- ToolStripOverflowButton.cs
- ListDictionaryInternal.cs
- AstNode.cs
- _TransmitFileOverlappedAsyncResult.cs
- MetadataElement.cs
- InfoCardProofToken.cs
- ProtocolReflector.cs
- CultureTable.cs
- AnimationClockResource.cs
- DataSourceSelectArguments.cs
- GridViewColumnCollection.cs
- Wizard.cs
- IChannel.cs
- Triplet.cs
- MessageBox.cs
- RegexWriter.cs
- WorkflowControlClient.cs
- Link.cs
- XPathItem.cs
- StrokeNodeData.cs
- ThemeDictionaryExtension.cs
- ThousandthOfEmRealDoubles.cs
- Unit.cs
- FixedSOMLineCollection.cs
- TableParaClient.cs
- XmlSerializationGeneratedCode.cs
- CodePageUtils.cs
- SqlCacheDependencySection.cs
- SliderAutomationPeer.cs
- DetailsViewModeEventArgs.cs
- WrapperEqualityComparer.cs
- ObjectQuery_EntitySqlExtensions.cs
- EpmContentDeSerializer.cs
- TextServicesDisplayAttributePropertyRanges.cs
- ToolStripControlHost.cs
- PeerApplication.cs
- updatecommandorderer.cs
- DataGridPagingPage.cs
- SubpageParaClient.cs
- ProxyGenerator.cs
- MissingSatelliteAssemblyException.cs
- EntityTransaction.cs
- COAUTHIDENTITY.cs
- CharacterShapingProperties.cs
- HtmlAnchor.cs
- PrintingPermission.cs
- GuidelineCollection.cs
- DocumentSchemaValidator.cs
- PartManifestEntry.cs
- HtmlGenericControl.cs
- XmlDesignerDataSourceView.cs
- EntitySqlQueryState.cs
- ConfigXmlText.cs
- Ray3DHitTestResult.cs
- ExternalException.cs