Κοινή χρήση μέσω


ServiceProxy<TService> Constructors

Definition

Overloads

ServiceProxy<TService>(IServiceConfiguration<TService>, SecurityTokenResponse)

Initializes a new instance of the ServiceProxy<TService> class using a service configuration and security token response.

ServiceProxy<TService>(IServiceConfiguration<TService>, ClientCredentials)

Initializes a new instance of the ServiceProxy<TService> class using a service configuration and client logon credentials.

ServiceProxy<TService>(IServiceManagement<TService>, SecurityTokenResponse)

Initializes a new instance of the ServiceProxy<TService> class using a service management and security token response.

ServiceProxy<TService>(IServiceManagement<TService>, ClientCredentials)

Initializes a new instance of the ServiceProxy<TService> class using a service management and client logon credentials.

ServiceProxy<TService>(Uri, Uri, ClientCredentials, ClientCredentials)

Initializes a new instance of the ServiceProxy<TService> class using a service URI, a home realm URI, client logon credentials, and Windows Live device credentials.

ServiceProxy<TService>(IServiceConfiguration<TService>, SecurityTokenResponse)

Initializes a new instance of the ServiceProxy<TService> class using a service configuration and security token response.

protected:
 ServiceProxy(Microsoft::Xrm::Sdk::Client::IServiceConfiguration<TService> ^ serviceConfiguration, Microsoft::Xrm::Sdk::Client::SecurityTokenResponse ^ securityTokenResponse);
protected ServiceProxy (Microsoft.Xrm.Sdk.Client.IServiceConfiguration<TService> serviceConfiguration, Microsoft.Xrm.Sdk.Client.SecurityTokenResponse securityTokenResponse);
new Microsoft.Xrm.Sdk.Client.ServiceProxy<'Service (requires 'Service : null)> : Microsoft.Xrm.Sdk.Client.IServiceConfiguration<'Service (requires 'Service : null)> * Microsoft.Xrm.Sdk.Client.SecurityTokenResponse -> Microsoft.Xrm.Sdk.Client.ServiceProxy<'Service (requires 'Service : null)>
Protected Sub New (serviceConfiguration As IServiceConfiguration(Of TService), securityTokenResponse As SecurityTokenResponse)

Parameters

serviceConfiguration
IServiceConfiguration<TService>

A service configuration.

securityTokenResponse
SecurityTokenResponse

A security token response.

Remarks

Use this constructor when the service configuration and security token have been acquired externally and only when claims-based authentication is configured.

Do not call the Authenticate() method after instantiating a ServiceProxy<TService> derived object using this constructor.

Applies to

ServiceProxy<TService>(IServiceConfiguration<TService>, ClientCredentials)

Initializes a new instance of the ServiceProxy<TService> class using a service configuration and client logon credentials.

protected:
 ServiceProxy(Microsoft::Xrm::Sdk::Client::IServiceConfiguration<TService> ^ serviceConfiguration, System::ServiceModel::Description::ClientCredentials ^ clientCredentials);
protected ServiceProxy (Microsoft.Xrm.Sdk.Client.IServiceConfiguration<TService> serviceConfiguration, System.ServiceModel.Description.ClientCredentials clientCredentials);
new Microsoft.Xrm.Sdk.Client.ServiceProxy<'Service (requires 'Service : null)> : Microsoft.Xrm.Sdk.Client.IServiceConfiguration<'Service (requires 'Service : null)> * System.ServiceModel.Description.ClientCredentials -> Microsoft.Xrm.Sdk.Client.ServiceProxy<'Service (requires 'Service : null)>
Protected Sub New (serviceConfiguration As IServiceConfiguration(Of TService), clientCredentials As ClientCredentials)

Parameters

serviceConfiguration
IServiceConfiguration<TService>

A service configuration.

clientCredentials
ClientCredentials

The logon credentials of the client.

Remarks

Use this constructor when the service configuration has been acquired externally, and Windows-based authentication is in use.

Do not call the Authenticate() method after instantiating a ServiceProxy<TService> derived object using this constructor.

Applies to

ServiceProxy<TService>(IServiceManagement<TService>, SecurityTokenResponse)

Initializes a new instance of the ServiceProxy<TService> class using a service management and security token response.

protected:
 ServiceProxy(Microsoft::Xrm::Sdk::Client::IServiceManagement<TService> ^ serviceManagement, Microsoft::Xrm::Sdk::Client::SecurityTokenResponse ^ securityTokenResponse);
protected ServiceProxy (Microsoft.Xrm.Sdk.Client.IServiceManagement<TService> serviceManagement, Microsoft.Xrm.Sdk.Client.SecurityTokenResponse securityTokenResponse);
new Microsoft.Xrm.Sdk.Client.ServiceProxy<'Service (requires 'Service : null)> : Microsoft.Xrm.Sdk.Client.IServiceManagement<'Service (requires 'Service : null)> * Microsoft.Xrm.Sdk.Client.SecurityTokenResponse -> Microsoft.Xrm.Sdk.Client.ServiceProxy<'Service (requires 'Service : null)>
Protected Sub New (serviceManagement As IServiceManagement(Of TService), securityTokenResponse As SecurityTokenResponse)

Parameters

serviceManagement
IServiceManagement<TService>

A service management.

securityTokenResponse
SecurityTokenResponse

A security token response.

Applies to

ServiceProxy<TService>(IServiceManagement<TService>, ClientCredentials)

Initializes a new instance of the ServiceProxy<TService> class using a service management and client logon credentials.

protected:
 ServiceProxy(Microsoft::Xrm::Sdk::Client::IServiceManagement<TService> ^ serviceManagement, System::ServiceModel::Description::ClientCredentials ^ clientCredentials);
protected ServiceProxy (Microsoft.Xrm.Sdk.Client.IServiceManagement<TService> serviceManagement, System.ServiceModel.Description.ClientCredentials clientCredentials);
new Microsoft.Xrm.Sdk.Client.ServiceProxy<'Service (requires 'Service : null)> : Microsoft.Xrm.Sdk.Client.IServiceManagement<'Service (requires 'Service : null)> * System.ServiceModel.Description.ClientCredentials -> Microsoft.Xrm.Sdk.Client.ServiceProxy<'Service (requires 'Service : null)>
Protected Sub New (serviceManagement As IServiceManagement(Of TService), clientCredentials As ClientCredentials)

Parameters

serviceManagement
IServiceManagement<TService>

A service management.

clientCredentials
ClientCredentials

The logon credentials of the client.

Applies to

ServiceProxy<TService>(Uri, Uri, ClientCredentials, ClientCredentials)

Initializes a new instance of the ServiceProxy<TService> class using a service URI, a home realm URI, client logon credentials, and Windows Live device credentials.

protected:
 ServiceProxy(Uri ^ uri, Uri ^ homeRealmUri, System::ServiceModel::Description::ClientCredentials ^ clientCredentials, System::ServiceModel::Description::ClientCredentials ^ deviceCredentials);
protected ServiceProxy (Uri uri, Uri homeRealmUri, System.ServiceModel.Description.ClientCredentials clientCredentials, System.ServiceModel.Description.ClientCredentials deviceCredentials);
new Microsoft.Xrm.Sdk.Client.ServiceProxy<'Service (requires 'Service : null)> : Uri * Uri * System.ServiceModel.Description.ClientCredentials * System.ServiceModel.Description.ClientCredentials -> Microsoft.Xrm.Sdk.Client.ServiceProxy<'Service (requires 'Service : null)>
Protected Sub New (uri As Uri, homeRealmUri As Uri, clientCredentials As ClientCredentials, deviceCredentials As ClientCredentials)

Parameters

uri
Uri

The URI of the service.

homeRealmUri
Uri

The URI of the WS-Trust metadata endpoint of a second ADFS instance.

clientCredentials
ClientCredentials

The client's logon credentials.

deviceCredentials
ClientCredentials

The credentials of a device registered with Windows Live. Only required when authenticating with Dataverse, otherwise use null.

Remarks

The home realm parameter is set to a non-null value when a second ADFS instance is configured as an identity provider to the ADFS instance that Microsoft Dynamics CRM 2011 has been configured with for claims authentication.

Applies to