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
정식 URI가 출력 매개 변수로 반환된 경우 true를 반환합니다.지정된 엔터티가 DataServiceContext에서 추적되지 않거나 추가된 상태인 경우 사용 가능한 URI가 없으므로 false가 반환됩니다.
예외
예외 | 조건 |
---|---|
ArgumentNullException | entity가 nullnull 참조(Visual Basic에서는 Nothing)인 경우 |
주의
Added 상태의 개체에는 아직 URI가 없습니다.