FilterElement::FilterData Property
Gets or sets the filter data of this configuration element.
Assembly: System.ServiceModel.Routing (in System.ServiceModel.Routing.dll)
public: [ConfigurationPropertyAttribute("filterData", DefaultValue = null, Options = ConfigurationPropertyOptions::None)] property String^ FilterData { String^ get(); void set(String^ value); }
The following table describes the meaning of FilterData based on the value of FilterType.
Filter Type | Description | Filter Data Meaning | Example Filter |
|---|---|---|---|
Action | Uses the ActionMessageFilter that comes with WCF. | The Action to filter upon. | <filter name="action1" filterType="Action" filterData="http://ACTION" /> |
Address | Uses the EndpointAddressMessageFilter that comes with WCF with ignore host name == true. | The address to filter upon (in the To header). | <filter name="address1" filterType="Address" filterData="http://host/vdir/s.svc/b" /> |
AddressPrefix | Uses the PrefixEndpointAddressMessageFilter that comes with WCF with ignore host name == true. | The address to filter upon using longest prefix matching. | <filter name="prefix1" filterType="AddressPrefix" filterData="http://host" /> |
StrictAnd | A custom AndMessageFilter that always evaluates both conditions before returning. | filterData is not used, instead filter1 and filter2 have the names of the corresponding messages filters (also in the table), which should be ANDed together. | <filter name="and1" filterType="And" filter1="address1" filter2="action1" /> |
Custom | A user-defined type that extends MessageFilter and has a constructor taking a string. | customType attribute is the fully-qualified type name of the class to create, filterData is the string to pass to the constructor when creating the filter. | <filter name="custom1" filterType="Custom" customType="CustomAssembly.CustomMsgFilter, CustomAssembly" filterData="Custom Data" /> |
EndpointName | A custom message filter for use solely in the Routing Service, which filters messages based on the name of the service endpoint. | The name of the service endpoint, for example: “serviceEndpoint1”. This should be one of the endpoints exposed on the Routing Service. | <filter name="stock1" filterType="Endpoint" filterData="SvcEndpoint" /> |
MatchAll | Uses the MatchAllMessageFilter that comes with WCF. | N/A | <filter name="matchAll1" filterType="MatchAll" /> |
XPath | Uses the XPathMessageFilter that comes with WCF. | The XPath query to use when matching messages. | <filter name="XPath1" filterType="XPath" filterData="//ns:element" /> |
Available since 4.0