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
- SiteMapPath.cs
- XmlDocumentType.cs
- Publisher.cs
- QilLoop.cs
- ProjectedSlot.cs
- TextTrailingWordEllipsis.cs
- Calendar.cs
- CompensableActivity.cs
- PreservationFileReader.cs
- IsolatedStorageException.cs
- TerminatingOperationBehavior.cs
- ServiceReference.cs
- Thread.cs
- RouteItem.cs
- ScriptControl.cs
- RefreshEventArgs.cs
- Point3DCollection.cs
- CommonXSendMessage.cs
- PointF.cs
- AsyncOperation.cs
- SqlStream.cs
- FocusTracker.cs
- FixedFindEngine.cs
- URLBuilder.cs
- TransformerInfoCollection.cs
- FileSecurity.cs
- InternalConfigEventArgs.cs
- ProcessHost.cs
- AppDomainUnloadedException.cs
- SubclassTypeValidator.cs
- SectionXmlInfo.cs
- SecurityRuntime.cs
- ApplicationFileParser.cs
- LookupNode.cs
- XmlSerializerSection.cs
- BaseProcessProtocolHandler.cs
- ObjectHandle.cs
- CodeMemberProperty.cs
- LinqDataSourceValidationException.cs
- BinaryUtilClasses.cs
- categoryentry.cs
- ParameterRefs.cs
- Timer.cs
- StreamAsIStream.cs
- EnterpriseServicesHelper.cs
- DisposableCollectionWrapper.cs
- WebServiceParameterData.cs
- CodeTypeReference.cs
- InputEventArgs.cs
- SymbolType.cs
- TimeoutException.cs
- X509ClientCertificateAuthentication.cs
- ReferencedType.cs
- Button.cs
- HttpListenerRequest.cs
- AccessDataSource.cs
- NativeMethods.cs
- WebPartCancelEventArgs.cs
- SemanticResolver.cs
- IIS7ConfigurationLoader.cs
- StreamWithDictionary.cs
- ClassImporter.cs
- login.cs
- TypedElement.cs
- XPathEmptyIterator.cs
- PLINQETWProvider.cs
- DesignerTransactionCloseEvent.cs
- SQLInt16.cs
- SqlAliaser.cs
- EdmTypeAttribute.cs
- FileFormatException.cs
- RegularExpressionValidator.cs
- ListViewAutomationPeer.cs
- OneToOneMappingSerializer.cs
- DesignerProperties.cs
- _Connection.cs
- SafeNativeMethodsMilCoreApi.cs
- LabelExpression.cs
- PeerNodeTraceRecord.cs
- StylusEditingBehavior.cs
- XmlDesigner.cs
- GenericWebPart.cs
- ScrollChrome.cs
- PageAdapter.cs
- SimpleWorkerRequest.cs
- RuleSetDialog.Designer.cs
- ErrorStyle.cs
- EdmComplexTypeAttribute.cs
- Literal.cs
- HttpResponseHeader.cs
- _HeaderInfo.cs
- RawAppCommandInputReport.cs
- ReadOnlyDataSource.cs
- SingleAnimationBase.cs
- ConfigXmlCDataSection.cs
- TranslateTransform.cs
- FixedSOMGroup.cs
- IListConverters.cs
- TreeNode.cs
- TreeBuilder.cs