CommandActivity Class
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
Represents a digression in the dialog flow caused by a request from the user.
Namespace: Microsoft.SpeechServer.Dialog
Assembly: Microsoft.SpeechServer (in microsoft.speechserver.dll)
Syntax
'Declaration
<ToolboxBitmapAttribute(GetType(CommandActivity))> _
<ActivityValidatorAttribute(GetType(CommandActivityValidator))> _
<GlobalizedDescriptionAttribute("CommandActivity")> _
<GlobalizedCategoryAttribute("MSSCategory")> _
<DesignerAttribute("Microsoft.SpeechServer.Authoring.DialogDesigner.CommandActivityDesigner, Microsoft.SpeechServer.Authoring.DialogDesigner, Version=2.0.3400.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", GetType(IDesigner))> _
<ToolboxItemAttribute(GetType(ActivityToolboxItem))> _
<DesignerSerializerAttribute("Microsoft.SpeechServer.Authoring.DialogDesigner.SpeechActivityMarkupSerializer, Microsoft.SpeechServer.Authoring.DialogDesigner, Version=2.0.3400.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", GetType(WorkflowMarkupSerializer))> _
<DesignerSerializerAttribute("Microsoft.SpeechServer.Authoring.DialogDesigner.GenericSpeechCodeDomSerializer, Microsoft.SpeechServer.Authoring.DialogDesigner, Version=2.0.3400.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", GetType(CodeDomSerializer))> _
Public Class CommandActivity
Inherits SpeechSequenceActivity
Implements IEventActivity
[ToolboxBitmapAttribute(typeof(CommandActivity))]
[ActivityValidatorAttribute(typeof(CommandActivityValidator))]
[GlobalizedDescriptionAttribute("CommandActivity")]
[GlobalizedCategoryAttribute("MSSCategory")]
[DesignerAttribute("Microsoft.SpeechServer.Authoring.DialogDesigner.CommandActivityDesigner, Microsoft.SpeechServer.Authoring.DialogDesigner, Version=2.0.3400.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", typeof(IDesigner))]
[ToolboxItemAttribute(typeof(ActivityToolboxItem))]
[DesignerSerializerAttribute("Microsoft.SpeechServer.Authoring.DialogDesigner.SpeechActivityMarkupSerializer, Microsoft.SpeechServer.Authoring.DialogDesigner, Version=2.0.3400.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", typeof(WorkflowMarkupSerializer))]
[DesignerSerializerAttribute("Microsoft.SpeechServer.Authoring.DialogDesigner.GenericSpeechCodeDomSerializer, Microsoft.SpeechServer.Authoring.DialogDesigner, Version=2.0.3400.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", typeof(CodeDomSerializer))]
public class CommandActivity : SpeechSequenceActivity, IEventActivity
Remarks
CommandActivity is matched when the user speaks a phrase that is recognized by the grammar associated with the CommandActivity. In contrast, a SpeechEventActivity represents a system-initiated event in the dialog flow.
CommandActivity represents an event and the associated handler for the event. The CommandActivity provides the event-subscription data. The children of the CommandActivity represent the handler logic for the event.
Two classes that derive from CommandActivity ??? HelpCommandActivity and RepeatCommandActivity ??? can be used to respond to commands for help and to repeat the most recent prompt. A CommandActivity can be used to enable an application to respond to commands other than for help or to repeat a prompt.
Inheritance Hierarchy
System.Object
???? System.Workflow.ComponentModel.DependencyObject
???????? System.Workflow.ComponentModel.Activity
???????????? System.Workflow.ComponentModel.CompositeActivity
???????????????? System.Workflow.Activities.SequenceActivity
???????????????????? Microsoft.SpeechServer.Dialog.SpeechSequenceActivity
????????????????????????Microsoft.SpeechServer.Dialog.CommandActivity
???????????????????????????? Microsoft.SpeechServer.Dialog.HelpCommandActivity
???????????????????????????? Microsoft.SpeechServer.Dialog.RepeatCommandActivity
Thread Safety
All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.
Platforms
Development Platforms
Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition
Target Platforms
Windows Server 2003
See Also
Reference
CommandActivity Members
Microsoft.SpeechServer.Dialog Namespace
HelpCommandActivity
RepeatCommandActivity