DataServiceContext.TryGetUri メソッド
指定されたエンティティに関連付けられた正規 URI がある場合は、それを取得します。
名前空間: System.Data.Services.Client
アセンブリ: Microsoft.Data.Services.Client (Microsoft.Data.Services.Client.dll)
構文
'宣言
Public Function TryGetUri ( _
entity As Object, _
<OutAttribute> ByRef identity As Uri _
) As Boolean
'使用
Dim instance As DataServiceContext
Dim entity As Object
Dim identity As Uri
Dim returnValue As Boolean
returnValue = instance.TryGetUri(entity, _
identity)
public bool TryGetUri(
Object entity,
out Uri identity
)
public:
bool TryGetUri(
Object^ entity,
[OutAttribute] Uri^% identity
)
member TryGetUri :
entity:Object *
identity:Uri byref -> bool
public function TryGetUri(
entity : Object,
identity : Uri
) : boolean
パラメーター
- entity
型: System.Object
identity によって識別されるエンティティ。
- identity
型: System.Uri%
エンティティの URI。
戻り値
型: System.Boolean
out パラメーターで正規 URI が返される場合は true を返します。指定されたエンティティが DataServiceContext によって追跡されないか、追加済み状態である場合、使用可能な URI は存在せず、false が返されます。
例外
例外 | 条件 |
---|---|
ArgumentNullException | entity が nullNULL 参照 (Visual Basic では Nothing) の場合。 |
説明
Added 状態のオブジェクトには URI はまだありません。