DataServiceContext.TryGetUri Method (Object, Uri)

 

Retrieves the canonical URI associated with the specified entity, if available.

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

public bool TryGetUri(
	object entity,
	out Uri identity
)

Parameters

entity
Type: System.Object

The entity identified by the identity.

identity
Type: System.Uri

The URI of the entity.

Return Value

Type: System.Boolean

Returns true if the canonical URI is returned in the out parameter. If the specified entity is not tracked by the DataServiceContext or is in the added state, no URI is available and false is returned.

Exception Condition
ArgumentNullException

When entity is null.

Objects in the Added state do not yet have a URI.

.NET Framework
Available since 3.5
Silverlight
Available since 2.0
Return to top
Show: