InstancePersistenceContext.CreateBindReclaimedLockException(Int64) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
TryCommand에서 throw되어 BindReclaimedLock 동작을 트리거할 수 있는 예외 인스턴스를 만듭니다.
public:
Exception ^ CreateBindReclaimedLockException(long instanceVersion);
public Exception CreateBindReclaimedLockException(long instanceVersion);
member this.CreateBindReclaimedLockException : int64 -> Exception
Public Function CreateBindReclaimedLockException (instanceVersion As Long) As Exception
매개 변수
- instanceVersion
- Int64
인스턴스에 보관된 잠금의 버전이거나, 지속성 공급자가 잠금 버전을 구현하지 않는 경우 0입니다.
반품
예외입니다.
설명
샘플 코드:
protected override bool TryCommand(InstancePersistenceContext context, InstancePersistenceCommand command, TimeSpan timeout)
{
throw context.CreateBindReclaimedLockException(5);
}
다음과 같습니다.
protected override bool TryCommand(InstancePersistenceContext context, InstancePersistenceCommand command, TimeSpan timeout)
{
context.BindReclaimedLock(5, timeout);
throw new OperationCanceledException();
}