Esempio n. 1
0
 internal FinallyBlock(NotNull <Action> tryAction)
 {
     _tryFunc =
         () =>
     {
         tryAction.Value.Invoke();
         return(true);
     };
 }
Esempio n. 2
0
 public static void Dispose <T>(NotNull <T> obj) where T : class
 {
     Wrap(obj).Dispose();
 }
Esempio n. 3
0
 public static Disposable <T> Wrap <T>(NotNull <T> value) where T : class
 {
     return(new Disposable <T>(value));
 }
Esempio n. 4
0
 public static NotNull <T> Wrap <T>(T value) where T : class
 {
     return(NotNull <T> .Create(value));
 }
Esempio n. 5
0
 internal FinallyBlock(NotNull <Func <T> > tryFunc)
 {
     _tryFunc = tryFunc.Value;
 }
Esempio n. 6
0
 public static NotNull <T> IsNotNull <T>(T argumentValue, string argumentName) where T : class
 {
     return(NotNull <T> .Create(argumentValue, argumentName));
 }