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
- AutomationEventArgs.cs
- ConfigXmlSignificantWhitespace.cs
- IntSecurity.cs
- RelationshipDetailsRow.cs
- HashMembershipCondition.cs
- SynthesizerStateChangedEventArgs.cs
- LockedActivityGlyph.cs
- EntityKey.cs
- XsltOutput.cs
- DrawingVisualDrawingContext.cs
- ValueConversionAttribute.cs
- SoapProtocolImporter.cs
- HttpListenerTimeoutManager.cs
- XamlPathDataSerializer.cs
- ListItemsPage.cs
- InvalidProgramException.cs
- ChoiceConverter.cs
- MetadataException.cs
- View.cs
- DirectoryInfo.cs
- TargetControlTypeAttribute.cs
- UpdatePanelTrigger.cs
- IndexExpression.cs
- MouseActionValueSerializer.cs
- PointAnimationUsingKeyFrames.cs
- StringOutput.cs
- CodeSnippetTypeMember.cs
- ToolboxItemFilterAttribute.cs
- PerspectiveCamera.cs
- CfgSemanticTag.cs
- DrawingContextWalker.cs
- WorkflowInstance.cs
- TreeNodeStyle.cs
- PageTrueTypeFont.cs
- dataSvcMapFileLoader.cs
- ListBoxAutomationPeer.cs
- DataView.cs
- LocalizeDesigner.cs
- SafeArrayRankMismatchException.cs
- BitmapVisualManager.cs
- NodeLabelEditEvent.cs
- AllMembershipCondition.cs
- StateMachineHelpers.cs
- hwndwrapper.cs
- SizeLimitedCache.cs
- Wildcard.cs
- FileDialogCustomPlace.cs
- DetailsViewUpdateEventArgs.cs
- DynamicEndpoint.cs
- TextServicesCompartmentEventSink.cs
- CodeMemberMethod.cs
- NameTable.cs
- VariableBinder.cs
- CapacityStreamGeometryContext.cs
- CellCreator.cs
- CanonicalFormWriter.cs
- DbConnectionOptions.cs
- BigInt.cs
- UnconditionalPolicy.cs
- WindowsFormsEditorServiceHelper.cs
- QueryResult.cs
- EventManager.cs
- ObjectDataSourceFilteringEventArgs.cs
- CopyOfAction.cs
- ComboBoxRenderer.cs
- DayRenderEvent.cs
- RotateTransform.cs
- EventLogEntryCollection.cs
- XmlEntity.cs
- DataChangedEventManager.cs
- Trace.cs
- WebPartActionVerb.cs
- DesignerView.xaml.cs
- NumericExpr.cs
- EastAsianLunisolarCalendar.cs
- WebServiceTypeData.cs
- DataGridViewRowCancelEventArgs.cs
- MemberJoinTreeNode.cs
- TreeNodeEventArgs.cs
- Rotation3DAnimation.cs
- precedingsibling.cs
- ReaderWriterLock.cs
- FixedSOMElement.cs
- MetafileHeaderEmf.cs
- ExponentialEase.cs
- CommandValueSerializer.cs
- SplitterPanel.cs
- QilBinary.cs
- FileRecordSequenceCompletedAsyncResult.cs
- TextHidden.cs
- PointLightBase.cs
- DataGridViewRowCollection.cs
- BamlBinaryWriter.cs
- CellCreator.cs
- Debug.cs
- PictureBox.cs
- LinearGradientBrush.cs
- UTF7Encoding.cs
- CallSite.cs
- NotificationContext.cs