Ejemplo n.º 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);
Ejemplo n.º 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));
     }
 }