Compartilhar via


DiscoveryServiceProxy Class

Definition

Implements IDiscoveryService and provides an authenticated WCF channel to the discovery service endpoint.

public ref class DiscoveryServiceProxy : Microsoft::Xrm::Sdk::Client::ServiceProxy<Microsoft::Xrm::Sdk::Discovery::IDiscoveryService ^>, Microsoft::Xrm::Sdk::Discovery::IDiscoveryService
public class DiscoveryServiceProxy : Microsoft.Xrm.Sdk.Client.ServiceProxy<Microsoft.Xrm.Sdk.Discovery.IDiscoveryService>, Microsoft.Xrm.Sdk.Discovery.IDiscoveryService
type DiscoveryServiceProxy = class
    inherit ServiceProxy<IDiscoveryService>
    interface IDiscoveryService
Public Class DiscoveryServiceProxy
Inherits ServiceProxy(Of IDiscoveryService)
Implements IDiscoveryService
Inheritance
DiscoveryServiceProxy
Implements

Remarks

You can make SDK calls using the IDiscoveryService interface by casting the proxy instance to a IDiscoveryService type.

This class is not thread safe. Dataverse authentication using the Microsoft Online Services environment identity provider, including Microsoft Office 365, is supported.

Constructors

DiscoveryServiceProxy(IServiceConfiguration<IDiscoveryService>, ClientCredentials)

Initializes a new instance of the DiscoveryServiceProxy class using a service configuration and client credentials.

DiscoveryServiceProxy(IServiceConfiguration<IDiscoveryService>, SecurityTokenResponse)

Initializes a new instance of the DiscoveryServiceProxy class using a service configuration and a security token response.

DiscoveryServiceProxy(IServiceManagement<IDiscoveryService>, ClientCredentials)

Initializes a new instance of the DiscoveryServiceProxy class using a service management and client credentials.

DiscoveryServiceProxy(IServiceManagement<IDiscoveryService>, SecurityTokenResponse)

Initializes a new instance of the DiscoveryServiceProxy class using a service management and a security token response.

DiscoveryServiceProxy(Uri, Uri, ClientCredentials, ClientCredentials)

Initializes a new instance of the DiscoveryServiceProxy class using a discovery service URI, home realm URI, and client and device credentials.

Properties

ChannelFactory

Gets a WCF channel factory that manages a single channel instance.

(Inherited from ServiceProxy<TService>)
ClientCredentials

Gets the login credentials of the client.

(Inherited from ServiceProxy<TService>)
DeviceCredentials

Gets the Windows Live credentials of a registered device.

(Inherited from ServiceProxy<TService>)
EndpointAutoSwitchEnabled

Gets or sets a value that enables automatic switching from the organization’s current endpoint to an alternate endpoint.

(Inherited from ServiceProxy<TService>)
EndpointSwitch

Gets the endpoint switch information from the web service configuration.

(Inherited from ServiceProxy<TService>)
HomeRealmSecurityTokenResponse

Gets the security token response of the home realm.

(Inherited from ServiceProxy<TService>)
HomeRealmUri

Gets the home realm URI.

(Inherited from ServiceProxy<TService>)
IsAuthenticated

Gets a value indicating if the WCF channel has been authenticated.

(Inherited from ServiceProxy<TService>)
SecurityTokenResponse

Gets the security token response.

(Inherited from ServiceProxy<TService>)
ServiceChannel

Gets the communication channel used to access a Microsoft Dynamics 365 service.

(Inherited from ServiceProxy<TService>)
ServiceConfiguration

Gets a service configuration.

(Inherited from ServiceProxy<TService>)
ServiceManagement

Gets a service management.

(Inherited from ServiceProxy<TService>)
Timeout

Gets or sets the maximum amount of time a single channel operation has to complete before a timeout fault is raised on a service channel binding.

(Inherited from ServiceProxy<TService>)
UserPrincipalName

Gets or sets the UPN that is an Internet-style login name for a user based on the Internet standard RFC 822.

(Inherited from ServiceProxy<TService>)

Methods

Authenticate()

Closes the service channel and channel factory if they are open, and then invokes AuthenticateCore().

(Inherited from ServiceProxy<TService>)
AuthenticateCore()

Authenticates the client with a service.

(Inherited from ServiceProxy<TService>)
AuthenticateCrossRealm()

Invokes AuthenticateCrossRealmCore().

(Inherited from ServiceProxy<TService>)
AuthenticateCrossRealmCore()

Authenticates a user in a realm other than the realm that the Microsoft Dynamics 365 server is located in.

(Inherited from ServiceProxy<TService>)
AuthenticateDevice()

Invokes AuthenticateDeviceCore().

(Inherited from ServiceProxy<TService>)
AuthenticateDeviceCore()

Authenticates a device with Windows Live.

(Inherited from ServiceProxy<TService>)
CloseChannel(Boolean)

Closes a validated service channel.

(Inherited from ServiceProxy<TService>)
Dispose()

Custom implementation of Dispose that disposes the service channel and channel factory.

(Inherited from ServiceProxy<TService>)
Dispose(Boolean)

Custom implementation of Dispose that disposes the service channel and channel factory.

(Inherited from ServiceProxy<TService>)
Execute(DiscoveryRequest)

See IDiscoveryService.Execute(DiscoveryRequest)

HandleFailover(BaseServiceFault, Nullable<Boolean>)

For internal use only.

(Inherited from ServiceProxy<TService>)
HandleFailover(Nullable<Boolean>)

For internal use only.

(Inherited from ServiceProxy<TService>)
OnFactoryClosed(ChannelEventArgs)

Event handler virtual method for a channel factory that is in a closed state.

(Inherited from ServiceProxy<TService>)
OnFactoryFaulted(ChannelFaultedEventArgs)

Event handler virtual method for a channel factory that is in a faulted state.

(Inherited from ServiceProxy<TService>)
OnFactoryOpened(ChannelEventArgs)

Event handler virtual method for a channel factory that is in an opened state.

(Inherited from ServiceProxy<TService>)
ShouldRetry(MessageSecurityException, Nullable<Boolean>)

Checks a message security exception to determine if a service call should be attempted again.

(Inherited from ServiceProxy<TService>)
SwitchToAlternateEndpoint()

Switches the organization’s current endpoint to an alternate endpoint, if one is available.

(Inherited from ServiceProxy<TService>)
ValidateAuthentication()

Authenticates the client and creates a new service channel.

(Inherited from ServiceProxy<TService>)

Events

EndpointSwitched

Occurs when a failover recovery has completed and the organization’s current endpoint has been switched to an alternate endpoint.

(Inherited from ServiceProxy<TService>)
EndpointSwitchRequired

Occurs when a failover has occurred and a switch from the organization’s current endpoint to an alternate endpoint is required.

(Inherited from ServiceProxy<TService>)
FactoryClosed

Occurs when a channel factory is closed.

(Inherited from ServiceProxy<TService>)
FactoryFaulted

Occurs when a channel factory is faulted.

(Inherited from ServiceProxy<TService>)
FactoryOpened

Occurs when a channel factory is opened.

(Inherited from ServiceProxy<TService>)

Applies to