AddressFilterMode Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies the type of match semantics used by the dispatcher to route incoming messages to the correct endpoint.
public enum class AddressFilterMode
public enum AddressFilterMode
type AddressFilterMode =
Public Enum AddressFilterMode
- Inheritance
Fields
Any | 2 | Indicates a filter that matches on any address of an incoming message. Using this value turns off the WCF address filter check. Any message, no matter what its WS-Addressing:To identity, is accepted. |
Exact | 0 | Indicates a filter that does an exact match on the address of an incoming message. |
Prefix | 1 | Indicates a filter does the longest prefix matches on the address of an incoming message. |
Examples
[ServiceBehavior(AddressFilterMode = AddressFilterMode.Prefix)]
public class CalculatorService : ICalculator
{
public double Add(double n1, double n2)
{
return n1 + n2;
}
public double Subtract(double n1, double n2)
{
return n1 - n2;
}
public double Multiply(double n1, double n2)
{
return n1 * n2;
}
public double Divide(double n1, double n2)
{
return n1 / n2;
}
}
<ServiceBehavior(AddressFilterMode := AddressFilterMode.Prefix)> _
Public Class CalculatorService
Implements ICalculator
Public Function Add(ByVal n1 As Double, ByVal n2 As Double) As Double Implements ICalculator.Add
Return n1 + n2
End Function
Public Function Subtract(ByVal n1 As Double, ByVal n2 As Double) As Double Implements ICalculator.Subtract
Return n1 - n2
End Function
Public Function Multiply(ByVal n1 As Double, ByVal n2 As Double) As Double Implements ICalculator.Multiply
Return n1 * n2
End Function
Public Function Divide(ByVal n1 As Double, ByVal n2 As Double) As Double Implements ICalculator.Divide
Return n1 / n2
End Function
End Class
Remarks
The value of the AddressFilterMode
enumeration is set on the ServiceBehaviorAttribute.AddressFilterMode property.
The longest prefix match criterion specified by Prefix requires that the destination address be matched by the largest number of leading address bits in the filter. The default value is Exact.
Applies to
Обратна връзка
https://aka.ms/ContentUserFeedback.
Очаквайте скоро: През цялата 2024 г. постепенно ще отстраняваме проблемите в GitHub като механизъм за обратна връзка за съдържание и ще го заменим с нова система за обратна връзка. За повече информация вижте:Подаване и преглед на обратна връзка за