AddressFilterMode AddressFilterMode AddressFilterMode AddressFilterMode Enum

Definición

Especifica el tipo de semántica de coincidencia utilizada por el distribuidor para enrutar los mensajes entrantes al punto de conexión correcto.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
Herencia
AddressFilterModeAddressFilterModeAddressFilterModeAddressFilterMode

Campos

Any Any Any Any 2

Indica un filtro que coincide en cualquier dirección de un mensaje entrante.Indicates a filter that matches on any address of an incoming message. Al usar este valor, se desactiva la comprobación del filtro de dirección de WCF.Using this value turns off the WCF address filter check. Se acepta cualquier mensaje, independientemente de su identidad WS-Addressing:To.Any message, no matter what its WS-Addressing:To identity, is accepted.

Exact Exact Exact Exact 0

Indica un filtro que coincide exactamente con la dirección de un mensaje entrante.Indicates a filter that does an exact match on the address of an incoming message.

Prefix Prefix Prefix Prefix 1

Indica un filtro con el que coincide el prefijo más largo en la dirección de un mensaje entrante.Indicates a filter does the longest prefix matches on the address of an incoming message.

Ejemplos

[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

Comentarios

El valor de la enumeración AddressFilterMode está definido en la propiedad ServiceBehaviorAttribute.AddressFilterMode.The value of the AddressFilterMode enumeration is set on the ServiceBehaviorAttribute.AddressFilterMode property.

El criterio de coincidencia de prefijo más largo especificado por prefix requiere que la dirección de destino coincida con el mayor número de bits de dirección principales del filtro.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. El valor predeterminado es Exact.The default value is Exact.

Se aplica a