public PInt32(PInt32 other) : this(PapillonPINVOKE.new_PInt32__SWIG_2(PInt32.getCPtr(other)), true) { if (PapillonPINVOKE.SWIGPendingException.Pending) { throw PapillonPINVOKE.SWIGPendingException.Retrieve(); } }
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); } }
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); }