Share via


DataServiceContext Constructor (Uri, DataServiceProtocolVersion)

Initializes a new instance of the DataServiceContext class with the specified serviceRoot and targeting the specific maxProtocolVersion.

Namespace:  System.Data.Services.Client
Assembly:  Microsoft.Data.Services.Client (in Microsoft.Data.Services.Client.dll)

Syntax

'Declaration
Public Sub New ( _
    serviceRoot As Uri, _
    maxProtocolVersion As DataServiceProtocolVersion _
)
'Usage
Dim serviceRoot As Uri 
Dim maxProtocolVersion As DataServiceProtocolVersion 

Dim instance As New DataServiceContext(serviceRoot, _
    maxProtocolVersion)
public DataServiceContext(
    Uri serviceRoot,
    DataServiceProtocolVersion maxProtocolVersion
)
public:
DataServiceContext(
    Uri^ serviceRoot, 
    DataServiceProtocolVersion maxProtocolVersion
)
new : 
        serviceRoot:Uri * 
        maxProtocolVersion:DataServiceProtocolVersion -> DataServiceContext
public function DataServiceContext(
    serviceRoot : Uri, 
    maxProtocolVersion : DataServiceProtocolVersion
)

Parameters

  • serviceRoot
    Type: System.Uri
    An absolute URI that identifies the root of a data service.

See Also

Reference

DataServiceContext Class

DataServiceContext Overload

System.Data.Services.Client Namespace