TcpTransportBindingElement.GetProperty<T>(BindingContext) Método

Definição

Obtém um objeto especificado por meio do BindingContext.Gets a specified object from the BindingContext.

public:
generic <typename T>
 where T : class override T GetProperty(System::ServiceModel::Channels::BindingContext ^ context);
public override T GetProperty<T> (System.ServiceModel.Channels.BindingContext context) where T : class;
override this.GetProperty : System.ServiceModel.Channels.BindingContext -> 'T (requires 'T : null)
Public Overrides Function GetProperty(Of T As Class) (context As BindingContext) As T

Parâmetros de tipo

T

O objeto a ser obtido.The object to get.

Parâmetros

Retornos

T

O objeto especificado do BindingContext ou null se o objeto não for encontrado.The specified object from the BindingContext, or null if the object is not found.

Exemplos

O exemplo a seguir mostra como obter um objeto especificado do BindingContext .The following example shows how to get a specified object from the BindingContext.

BasicHttpBinding binding = new BasicHttpBinding();
ISecurityCapabilities b =
    binding.GetProperty<ISecurityCapabilities>
    (new BindingParameterCollection());

bool SupportsServerAuthentication =
    b.SupportsServerAuthentication;

Comentários

Esse método obtém o objeto especificado da classe base ou de um dos ancestrais dessa classe.This method gets the specified object from the base class, or from one of that class's ancestors. O objeto retornado geralmente é uma coleção de propriedades, por exemplo, um objeto que implementa ISecurityCapabilities .The object returned is usually a collection of properties, for example, an object that implements ISecurityCapabilities.

Aplica-se a