예제 #1
0
        public static async ValueTask <LockingEnumerator <T> > GetAsync(IHasLockObject objMyParent)
        {
            await objMyParent.LockObject.EnterReadLockAsync();

            return(new LockingEnumerator <T>(objMyParent));
        }
예제 #2
0
 private LockingEnumerator(IHasLockObject objMyParent)
 {
     _objMyParent = objMyParent;
 }
예제 #3
0
 public LockingDictionaryEnumerator(IHasLockObject objMyParent)
 {
     _objMyParent = objMyParent;
     _objMyParent.LockObject.EnterReadLock();
 }
예제 #4
0
 public static LockingEnumerator <T> Get(IHasLockObject objMyParent)
 {
     objMyParent.LockObject.EnterReadLock();
     return(new LockingEnumerator <T>(objMyParent));
 }
 private LockingDictionaryEnumerator(IHasLockObject objMyParent)
 {
     _objMyParent = objMyParent;
 }
 public static LockingDictionaryEnumerator Get(IHasLockObject objMyParent)
 {
     objMyParent.LockObject.EnterReadLock();
     return(new LockingDictionaryEnumerator(objMyParent));
 }
예제 #7
0
        public static ValueTask <EnterReadLock> EnterAsync(IHasLockObject rwlMyLockCarrier, CancellationToken token = default)
        {
            AsyncFriendlyReaderWriterLock rwlMyLock = rwlMyLockCarrier.LockObject;

            return(EnterAsync(rwlMyLock, token));
        }
예제 #8
0
        public static async ValueTask <LockingEnumerator <T> > GetAsync(IHasLockObject objMyParent, CancellationToken token = default)
        {
            await objMyParent.LockObject.EnterReadLockAsync(token);

            return(new LockingEnumerator <T>(objMyParent));
        }
예제 #9
0
 public static LockingEnumerator <T> Get(IHasLockObject objMyParent, CancellationToken token = default)
 {
     objMyParent.LockObject.EnterReadLock(token);
     return(new LockingEnumerator <T>(objMyParent));
 }