Share via


WebDomainClient<TContract> Constructor (Uri, Boolean, ChannelFactory<TContract>)

[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]

Initializes a new instance of the WebDomainClient<TContract> class with the specified service URI, the option to use HTTPS, and the channel factory.

Namespace:  System.ServiceModel.DomainServices.Client
Assembly:  System.ServiceModel.DomainServices.Client.Web (in System.ServiceModel.DomainServices.Client.Web.dll)

Syntax

'Declaration
Public Sub New ( _
    serviceUri As Uri, _
    usesHttps As Boolean, _
    channelFactory As ChannelFactory(Of TContract) _
)
'Usage
Dim serviceUri As Uri
Dim usesHttps As Boolean
Dim channelFactory As ChannelFactory(Of TContract)

Dim instance As New WebDomainClient(serviceUri, _
    usesHttps, channelFactory)
public WebDomainClient(
    Uri serviceUri,
    bool usesHttps,
    ChannelFactory<TContract> channelFactory
)
public:
WebDomainClient(
    Uri^ serviceUri, 
    bool usesHttps, 
    ChannelFactory<TContract>^ channelFactory
)
new : 
        serviceUri:Uri * 
        usesHttps:bool * 
        channelFactory:ChannelFactory<'TContract> -> WebDomainClient
public function WebDomainClient(
    serviceUri : Uri, 
    usesHttps : boolean, 
    channelFactory : ChannelFactory<TContract>
)

Parameters

  • serviceUri
    Type: System.Uri
    The domain service URI.
  • usesHttps
    Type: System.Boolean
    A value indicating whether the client should contact the service using an HTTP or HTTPS scheme.

Exceptions

Exception Condition
ArgumentNullException

serviceUri is nulla null reference (Nothing in Visual Basic).

ArgumentException

serviceUri is absolute and usesHttps is true.

See Also

Reference

WebDomainClient<TContract> Class

WebDomainClient<TContract> Overload

System.ServiceModel.DomainServices.Client Namespace