ActionMessageFilter Class
.NET Framework 3.0
Represents a query that tests whether the action of a message is one of a specified set of actions.
Namespace: System.ServiceModel.Dispatcher
Assembly: System.ServiceModel (in system.servicemodel.dll)
Assembly: System.ServiceModel (in system.servicemodel.dll)
It is invalid to construct an ActionMessageFilter with no actions.
This type is serializable as a DataContractAttribute.
The following example creates two ActionMessageFilters, gets the action string out of one of the filters using the Actions property, tests a message against the action filters directly, and displays the result of applying the filter.
Imports System Imports System.Collections.ObjectModel Imports System.ServiceModel Imports System.ServiceModel.Channels Imports System.ServiceModel.Dispatcher Namespace UE.Wfc.Samples Class ActionMessageFilterMatching Shared Sub Main() ' Create several action filters. Dim myActFltr As ActionMessageFilter = New ActionMessageFilter("1st Action", "2nd Action") Dim yourACtFltr As ActionMessageFilter = New ActionMessageFilter("Your Action") ' Display the ActionMessageFilter actions. Dim results As ReadOnlyCollection(Of String) = myActFltr.Actions For Each result As String In results System.Console.WriteLine(result) Next ' Create a message. Dim message As Message = Channels.Message.CreateMessage(MessageVersion.Soap11WSAddressing10, "myBody") ' Test the message action against a single action filter. Dim test1 As Boolean = myActFltr.Match(message) Dim test2 As Boolean = yourACtFltr.Match(message) System.Console.WriteLine("The result of test1 is {0}", test1) System.Console.WriteLine("The result of test2 is {0}", test2) End Sub End Class End Namespace
System.Object
System.ServiceModel.Dispatcher.MessageFilter
System.ServiceModel.Dispatcher.ActionMessageFilter
System.ServiceModel.Dispatcher.MessageFilter
System.ServiceModel.Dispatcher.ActionMessageFilter
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: