Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Speech / Src / Recognition / SrgsGrammar / SrgsRulesCollection.cs / 1 / SrgsRulesCollection.cs
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
//
// Description:
//
// History:
// 5/1/2004 jeanfp
//---------------------------------------------------------------------------
using System;
using System.Collections.ObjectModel;
using System.Speech.Internal;
namespace System.Speech.Recognition.SrgsGrammar
{
///
/// Summary description for Rules.
///
[Serializable]
public sealed class SrgsRulesCollection : KeyedCollection
{
///
/// TODOC
///
///
public void Add (params SrgsRule [] rules)
{
Helpers.ThrowIfNull (rules, "rules");
for (int iRule = 0; iRule < rules.Length; iRule++)
{
if (rules [iRule] == null)
{
throw new ArgumentNullException ("rules", SR.Get (SRID.ParamsEntryNullIllegal));
}
base.Add (rules [iRule]);
}
}
///
/// TODOC
///
///
///
protected override string GetKeyForItem (SrgsRule rule)
{
if (rule == null)
{
throw new ArgumentNullException ("rule");
}
return rule.Id;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
//
// Description:
//
// History:
// 5/1/2004 jeanfp
//---------------------------------------------------------------------------
using System;
using System.Collections.ObjectModel;
using System.Speech.Internal;
namespace System.Speech.Recognition.SrgsGrammar
{
///
/// Summary description for Rules.
///
[Serializable]
public sealed class SrgsRulesCollection : KeyedCollection
{
///
/// TODOC
///
///
public void Add (params SrgsRule [] rules)
{
Helpers.ThrowIfNull (rules, "rules");
for (int iRule = 0; iRule < rules.Length; iRule++)
{
if (rules [iRule] == null)
{
throw new ArgumentNullException ("rules", SR.Get (SRID.ParamsEntryNullIllegal));
}
base.Add (rules [iRule]);
}
}
///
/// TODOC
///
///
///
protected override string GetKeyForItem (SrgsRule rule)
{
if (rule == null)
{
throw new ArgumentNullException ("rule");
}
return rule.Id;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlSchemaObjectCollection.cs
- Configuration.cs
- TransformerTypeCollection.cs
- SoapHeaders.cs
- DataGridViewCellMouseEventArgs.cs
- InternalTypeHelper.cs
- ProfileGroupSettings.cs
- DefaultObjectMappingItemCollection.cs
- ImportCatalogPart.cs
- RequestStatusBarUpdateEventArgs.cs
- _BaseOverlappedAsyncResult.cs
- Crypto.cs
- _NtlmClient.cs
- WebBrowserNavigatedEventHandler.cs
- IListConverters.cs
- CachingHintValidation.cs
- RangeValidator.cs
- RtfToken.cs
- ClientType.cs
- XmlSchemaComplexContent.cs
- RemoveStoryboard.cs
- EventTrigger.cs
- CompensatableSequenceActivity.cs
- PrintPageEvent.cs
- InternalTypeHelper.cs
- FormView.cs
- AttributeEmitter.cs
- HttpChannelBindingToken.cs
- ExpressionNode.cs
- HistoryEventArgs.cs
- ToolStrip.cs
- ChannelEndpointElementCollection.cs
- BitmapFrame.cs
- Parsers.cs
- SplitterEvent.cs
- XmlSerializerNamespaces.cs
- SpeechUI.cs
- TransformCryptoHandle.cs
- XmlHelper.cs
- WebReferencesBuildProvider.cs
- SapiRecoInterop.cs
- StrokeDescriptor.cs
- Parsers.cs
- TextDecorationCollection.cs
- InputProviderSite.cs
- CustomCategoryAttribute.cs
- CheckPair.cs
- ProfileEventArgs.cs
- SourceExpressionException.cs
- InheritedPropertyChangedEventArgs.cs
- LinkConverter.cs
- ArrayExtension.cs
- HttpHandlerActionCollection.cs
- SqlUDTStorage.cs
- AuthorizationRule.cs
- MediaContext.cs
- CrossAppDomainChannel.cs
- HttpPostClientProtocol.cs
- SourceElementsCollection.cs
- DataSet.cs
- Hash.cs
- DispatcherHookEventArgs.cs
- ServiceNameElementCollection.cs
- ComIntegrationManifestGenerator.cs
- RectangleGeometry.cs
- ObjectItemCollection.cs
- HyperlinkAutomationPeer.cs
- OperationValidationEventArgs.cs
- GridViewHeaderRowPresenter.cs
- PeerContact.cs
- HttpHandlerActionCollection.cs
- TimeSpanValidator.cs
- DetailsViewInsertedEventArgs.cs
- SiteMapPath.cs
- HandlerBase.cs
- DictionaryTraceRecord.cs
- DoubleCollectionValueSerializer.cs
- ParallelDesigner.cs
- EntityDataSourceEntitySetNameItem.cs
- ResolvedKeyFrameEntry.cs
- FixedSOMElement.cs
- XsdCachingReader.cs
- StringExpressionSet.cs
- ProjectionQueryOptionExpression.cs
- ListView.cs
- UpdateCommand.cs
- RelationshipWrapper.cs
- AsyncOperationManager.cs
- DoubleAnimationUsingPath.cs
- GlyphShapingProperties.cs
- CompatibleIComparer.cs
- TargetConverter.cs
- EntityStoreSchemaFilterEntry.cs
- CheckBoxField.cs
- URLMembershipCondition.cs
- RevocationPoint.cs
- WorkflowMarkupElementEventArgs.cs
- PropertyKey.cs
- ProviderConnectionPoint.cs
- List.cs