共用方式為


DiscoveryWebProxyClient Class

 

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online

Implements IDiscoveryService and provides an authenticated connection to the Discovery.svc/web endpoint. This /web endpoint is also used by web resources.

Namespace:   Microsoft.Xrm.Sdk.WebServiceClient
Assembly:  Microsoft.Xrm.Sdk (in Microsoft.Xrm.Sdk.dll)

Inheritance Hierarchy

System.Object
  System.ServiceModel.ClientBase<TChannel>
    Microsoft.Xrm.Sdk.WebServiceClient.WebProxyClient<TService>
      Microsoft.Xrm.Sdk.WebServiceClient.DiscoveryWebProxyClient

Syntax

public class DiscoveryWebProxyClient : WebProxyClient<IDiscoveryService>, 
    IDiscoveryService
Public Class DiscoveryWebProxyClient
    Inherits WebProxyClient(Of IDiscoveryService)
    Implements IDiscoveryService

Constructors

Name Description
System_CAPS_pubmethod DiscoveryWebProxyClient(Uri)

Initializes a new instance of theDiscoveryWebProxyClient class using a Discovery service URL.

System_CAPS_pubmethod DiscoveryWebProxyClient(Uri, TimeSpan)

Initializes a new instance of theDiscoveryWebProxyClient class using a Discovery service URL and a time span.

Properties

Name Description
System_CAPS_protproperty Channel

(Inherited from ClientBase<TChannel>.)

System_CAPS_pubproperty ChannelFactory

(Inherited from ClientBase<TChannel>.)

System_CAPS_pubproperty ClientCredentials

(Inherited from ClientBase<TChannel>.)

System_CAPS_pubproperty Endpoint

(Inherited from ClientBase<TChannel>.)

System_CAPS_pubproperty HeaderToken

The access token returned from OAuth authentication.(Inherited from WebProxyClient<TService>.)

System_CAPS_pubproperty InnerChannel

(Inherited from ClientBase<TChannel>.)

System_CAPS_pubproperty SdkClientVersion

The version of your client application.(Inherited from WebProxyClient<TService>.)

System_CAPS_pubproperty State

(Inherited from ClientBase<TChannel>.)

Methods

Name Description
System_CAPS_pubmethod Abort()

(Inherited from ClientBase<TChannel>.)

System_CAPS_pubmethod Close()

(Inherited from ClientBase<TChannel>.)

System_CAPS_protmethod CreateChannel()

(Inherited from ClientBase<TChannel>.)

System_CAPS_protmethod CreateNewInitializer()

Creates the WCF proxy client initializer which gets invoked on every SDK method call. This method makes sure that the access token and other header values are added to the outbound call.(Overrides WebProxyClient<TService>.CreateNewInitializer().)

System_CAPS_pubmethod DisplayInitializationUI()

(Inherited from ClientBase<TChannel>.)

System_CAPS_pubmethod Dispose()

Disposes the web proxy client object.(Inherited from WebProxyClient<TService>.)

System_CAPS_protmethod Dispose(Boolean)

Disposes the web proxy client object.(Inherited from WebProxyClient<TService>.)

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_pubmethod Execute(DiscoveryRequest)

System_CAPS_protmethod ExecuteCore(DiscoveryRequest)

For internal use only.

System_CAPS_protmethod Finalize()

Destructor for the WebProxyClient<TService> class.(Inherited from WebProxyClient<TService>.)

System_CAPS_protmethod GetDefaultValueForInitialization<T>()

(Inherited from ClientBase<TChannel>.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod InvokeAsync(ClientBase<TChannel>.BeginOperationDelegate, Object[], ClientBase<TChannel>.EndOperationDelegate, SendOrPostCallback, Object)

(Inherited from ClientBase<TChannel>.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod Open()

(Inherited from ClientBase<TChannel>.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Explicit Interface Implementations

Name Description
System_CAPS_pubinterfaceSystem_CAPS_privevent ICommunicationObject.Closed

(Inherited from ClientBase<TChannel>.)

System_CAPS_pubinterfaceSystem_CAPS_privevent ICommunicationObject.Closing

(Inherited from ClientBase<TChannel>.)

System_CAPS_pubinterfaceSystem_CAPS_privevent ICommunicationObject.Faulted

(Inherited from ClientBase<TChannel>.)

System_CAPS_pubinterfaceSystem_CAPS_privevent ICommunicationObject.Opened

(Inherited from ClientBase<TChannel>.)

System_CAPS_pubinterfaceSystem_CAPS_privevent ICommunicationObject.Opening

(Inherited from ClientBase<TChannel>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod IDisposable.Dispose()

(Inherited from ClientBase<TChannel>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod ICommunicationObject.BeginClose(AsyncCallback, Object)

(Inherited from ClientBase<TChannel>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod ICommunicationObject.BeginClose(TimeSpan, AsyncCallback, Object)

(Inherited from ClientBase<TChannel>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod ICommunicationObject.BeginOpen(AsyncCallback, Object)

(Inherited from ClientBase<TChannel>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod ICommunicationObject.BeginOpen(TimeSpan, AsyncCallback, Object)

(Inherited from ClientBase<TChannel>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod ICommunicationObject.Close(TimeSpan)

(Inherited from ClientBase<TChannel>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod ICommunicationObject.EndClose(IAsyncResult)

(Inherited from ClientBase<TChannel>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod ICommunicationObject.EndOpen(IAsyncResult)

(Inherited from ClientBase<TChannel>.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod ICommunicationObject.Open(TimeSpan)

(Inherited from ClientBase<TChannel>.)

Remarks

You must set the HeaderToken and SdkClientVersion property values before using the proxy object to make service calls.

To call the Discovery web service using the IDiscoveryService interface, cast the proxy instance to an IDiscoveryService type.

Thread Safety

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.Xrm.Sdk.WebServiceClient Namespace
Discover the URL for your organization using the Organization Service
Authenticate the user with the web services

Return to top

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright