Exemplo n.º 1
0
 public AutoLocker(AutoLocker src) : this(C4dApiPINVOKE.new_AutoLocker__SWIG_1(AutoLocker.getCPtr(src)), true)
 {
     if (C4dApiPINVOKE.SWIGPendingException.Pending)
     {
         throw C4dApiPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Register your own global factory for generating assertion exceptions
 /// where you assertion can also take an inner exception. Threads may
 /// override this factory.
 /// </summary>
 /// <param name="generator"></param>
 /// <typeparam name="T"></typeparam>
 public static void RegisterAssertionsFactory <T>(
     Func <string, Exception, T> generator
     ) where T : Exception
 {
     using var _            = new AutoLocker(GeneratorLock);
     _usingCustomAssertions = false;
     _assertionsGenerator   = (s, e) => generator(GenerateMessageFor(e, s), e)
                              ?? throw new ArgumentNullException(nameof(generator));
 }
Exemplo n.º 3
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AutoLocker obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }