コード例 #1
0
 public PInt32(PInt32 other) : this(PapillonPINVOKE.new_PInt32__SWIG_2(PInt32.getCPtr(other)), true)
 {
     if (PapillonPINVOKE.SWIGPendingException.Pending)
     {
         throw PapillonPINVOKE.SWIGPendingException.Retrieve();
     }
 }
コード例 #2
0
ファイル: PInt32Test.cs プロジェクト: walterstypula/Prig
        public void TryParse_should_be_callable_indirectly()
        {
            using (new IndirectionsContext())
            {
                // Arrange
                PInt32.TryParseStringInt32Ref().Body = (string s, out int result) => { result = 42; return(false); };

                // Act
                var actualResult = default(int);
                var actualReturn = int.TryParse("10", out actualResult);

                // Assert
                Assert.IsFalse(actualReturn);
                Assert.AreEqual(42, actualResult);
            }
        }
コード例 #3
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PInt32 obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }