ContractDescription.GetContract Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Retourneert de contractbeschrijving voor een opgegeven type contract.
Overloads
| Name | Description |
|---|---|
| GetContract(Type, Type) |
Retourneert de contractbeschrijving voor een opgegeven type contract en een opgegeven servicetype. |
| GetContract(Type, Object) |
Retourneert de contractbeschrijving voor een opgegeven type contract en service-implementatie. |
| GetContract(Type) |
Retourneert de contractbeschrijving voor een opgegeven type contract. |
Opmerkingen
Het verschil tussen de GetContract overbelastingen is dat de kenmerken met twee argumenten u in staat stellen kenmerken van de service te vinden (bijvoorbeeld OperationBehaviorAttribute).
GetContract(Type, Type)
Retourneert de contractbeschrijving voor een opgegeven type contract en een opgegeven servicetype.
public:
static System::ServiceModel::Description::ContractDescription ^ GetContract(Type ^ contractType, Type ^ serviceType);
public static System.ServiceModel.Description.ContractDescription GetContract(Type contractType, Type serviceType);
static member GetContract : Type * Type -> System.ServiceModel.Description.ContractDescription
Public Shared Function GetContract (contractType As Type, serviceType As Type) As ContractDescription
Parameters
Retouren
Het ContractDescription voor het opgegeven type contract en het type service.
Voorbeelden
ContractDescription cd4 = ContractDescription.GetContract(typeof(ICalculator), typeof(CalculatorService));
Dim cd4 As ContractDescription = ContractDescription.GetContract(GetType(ICalculator), GetType(CalculatorService))
Opmerkingen
Het verschil tussen de GetContract overbelastingen is dat de kenmerken met twee argumenten u in staat stellen kenmerken van de service te vinden (bijvoorbeeld OperationBehaviorAttribute).
Van toepassing op
GetContract(Type, Object)
Retourneert de contractbeschrijving voor een opgegeven type contract en service-implementatie.
public:
static System::ServiceModel::Description::ContractDescription ^ GetContract(Type ^ contractType, System::Object ^ serviceImplementation);
public static System.ServiceModel.Description.ContractDescription GetContract(Type contractType, object serviceImplementation);
static member GetContract : Type * obj -> System.ServiceModel.Description.ContractDescription
Public Shared Function GetContract (contractType As Type, serviceImplementation As Object) As ContractDescription
Parameters
Retouren
De ContractDescription voor het opgegeven type contract- en service-implementatie.
Voorbeelden
CalculatorService calcSvc = new CalculatorService();
ContractDescription cd3 = ContractDescription.GetContract(typeof(ICalculator), calcSvc);
Dim calcSvc As New CalculatorService()
Dim cd3 As ContractDescription = ContractDescription.GetContract(GetType(ICalculator), calcSvc)
Opmerkingen
Het verschil tussen de GetContract overbelastingen is dat de kenmerken met twee argumenten u in staat stellen kenmerken van de service te vinden (bijvoorbeeld OperationBehaviorAttribute).
Van toepassing op
GetContract(Type)
Retourneert de contractbeschrijving voor een opgegeven type contract.
public:
static System::ServiceModel::Description::ContractDescription ^ GetContract(Type ^ contractType);
public static System.ServiceModel.Description.ContractDescription GetContract(Type contractType);
static member GetContract : Type -> System.ServiceModel.Description.ContractDescription
Public Shared Function GetContract (contractType As Type) As ContractDescription
Parameters
Retouren
De ContractDescription voor het opgegeven type contract.
Voorbeelden
ContractDescription cd2 = ContractDescription.GetContract(typeof(ICalculator));
Dim cd2 As ContractDescription = ContractDescription.GetContract(GetType(ICalculator))
Opmerkingen
Het verschil tussen de GetContract overbelastingen is dat de kenmerken met twee argumenten u in staat stellen kenmerken van de service te vinden (bijvoorbeeld OperationBehaviorAttribute).