Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / 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
- AdPostCacheSubstitution.cs
- MimePart.cs
- SelectingProviderEventArgs.cs
- AppDomainFactory.cs
- TypeConverter.cs
- FactoryGenerator.cs
- SafeTimerHandle.cs
- PropertyGridView.cs
- FileVersionInfo.cs
- UrlMapping.cs
- PrinterUnitConvert.cs
- BaseHashHelper.cs
- ArgumentOutOfRangeException.cs
- complextypematerializer.cs
- DataRelationCollection.cs
- FixedPageAutomationPeer.cs
- RtfControls.cs
- Int16AnimationUsingKeyFrames.cs
- InternalTypeHelper.cs
- BamlLocalizableResource.cs
- TraceSwitch.cs
- LateBoundChannelParameterCollection.cs
- FontUnit.cs
- ProfileSettingsCollection.cs
- FrameworkContentElementAutomationPeer.cs
- Enumerable.cs
- UrlMappingCollection.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- FileLogRecordHeader.cs
- ProfileService.cs
- FreezableCollection.cs
- SelectionService.cs
- PropertyInformation.cs
- IndentedWriter.cs
- Graph.cs
- AssemblyAttributesGoHere.cs
- TextDecorationCollection.cs
- unsafeIndexingFilterStream.cs
- ZoneIdentityPermission.cs
- RecommendedAsConfigurableAttribute.cs
- AddInServer.cs
- SQLInt16Storage.cs
- QuaternionIndependentAnimationStorage.cs
- Item.cs
- BamlCollectionHolder.cs
- ParentUndoUnit.cs
- MenuItemBinding.cs
- ExtendedProperty.cs
- StreamGeometry.cs
- ErrorFormatterPage.cs
- StorageInfo.cs
- HtmlHead.cs
- RegistryDataKey.cs
- GeneralTransform3D.cs
- IdentifierCollection.cs
- GeneratedContractType.cs
- OracleLob.cs
- BitmapEffectGroup.cs
- TypeLoadException.cs
- JoinSymbol.cs
- ErrorEventArgs.cs
- HtmlInputReset.cs
- WorkflowServiceBehavior.cs
- BatchParser.cs
- DispatcherExceptionFilterEventArgs.cs
- TreeNodeBinding.cs
- wmiprovider.cs
- MembershipAdapter.cs
- ExtentJoinTreeNode.cs
- TableStyle.cs
- HwndHostAutomationPeer.cs
- DbDataRecord.cs
- DbMetaDataCollectionNames.cs
- Identity.cs
- PageThemeCodeDomTreeGenerator.cs
- RepeatInfo.cs
- WebPartTransformerAttribute.cs
- CurrencyWrapper.cs
- AccessKeyManager.cs
- SplitterEvent.cs
- TextSerializer.cs
- HttpCacheParams.cs
- HuffModule.cs
- RoleService.cs
- Empty.cs
- ListViewGroupConverter.cs
- DesignerGenericWebPart.cs
- DataTableNameHandler.cs
- UnsafeNativeMethods.cs
- BuildResultCache.cs
- SizeIndependentAnimationStorage.cs
- RemoteCryptoSignHashRequest.cs
- DataGridColumnStyleMappingNameEditor.cs
- UriWriter.cs
- BaseTemplatedMobileComponentEditor.cs
- GPStream.cs
- Popup.cs
- HScrollBar.cs
- TypeContext.cs
- LayoutEditorPart.cs