public void InInterfaceParameter()
 {
     using (var test = new ManagedImplementation())
     {
         Assert.True(nativeView.AreEqual(test));
     }
 }
 public void CloneInstance(out CallbackInterface @out)
 {
     if (ThrowExceptionInClone)
     {
         throw new InvalidOperationException();
     }
     @out = new ManagedImplementation();
 }
Exemple #3
0
 public void InInterfaceParameter()
 {
     using (SetupTests(false, out var nativeView, out _))
     {
         using (var test = new ManagedImplementation())
         {
             Assert.True(nativeView.AreEqual(test));
         }
     }
 }
Exemple #4
0
        private static IDisposable SetupTests(bool supportExceptions, out CallbackInterfaceNative nativeView, out ManagedImplementation target)
        {
            target     = supportExceptions ? new ExceptionEnabledManagedImplementation() : new ManagedImplementation();
            nativeView = new CallbackInterfaceNative(MarshallingHelpers.ToCallbackPtr <CallbackInterface>(target));

            return(new CompositeDisposable
            {
                target,
                nativeView
            });
        }
 public AutoShadowTests()
 {
     target     = new ManagedImplementation();
     nativeView = new CallbackInterfaceNative(CppObject.ToCallbackPtr <CallbackInterface>(target));
 }