コード例 #1
0
 static T P_FailedState_ValueGetter(Vh <T> store, bool disposeTolerant)
 {
     if (disposeTolerant)
     {
         var exception = store.TryReadDA(location: ref store._exception);
         if (exception is null || ReferenceEquals(objA: exception, objB: ValueHolderUtilities.HasExceptionSentinel) || exception.SourceException is ObjectDisposedException)
         {
             return(default);
コード例 #2
0
 static T P_ValueGetter(Vh <T> holder, bool disposeTolerant)
 {
     if (disposeTolerant)
     {
         return(holder.TryReadDA(ref holder._value));
     }
     else
     {
         return(holder.ReadDA(ref holder._value));
     }
 }