public CsReturnValue Create(CppReturnValue cppReturnValue) { var retVal = CreateCore <CsReturnValue>(cppReturnValue); MakeGeneralPointersBeIntPtr(retVal); return(retVal); }
public void PointerNonInterfaceReturnValueMappedAsIntPtr() { var cppReturnValue = new CppReturnValue { TypeName = "int", Pointer = "*" }; TypeRegistry.BindType("int", TypeRegistry.Int32); var csReturnValue = marshalledElementFactory.Create(cppReturnValue); Assert.Equal(TypeRegistry.IntPtr, csReturnValue.PublicType); Assert.Equal(TypeRegistry.IntPtr, csReturnValue.MarshalType); Assert.True(csReturnValue.HasPointer); Assert.False(csReturnValue.IsArray); Assert.Equal(0, csReturnValue.ArrayDimensionValue); }
public void PointerNonInterfaceReturnValueMappedAsIntPtr() { var cppReturnValue = new CppReturnValue { TypeName = "int", Pointer = "*" }; var typeRegistry = new TypeRegistry(Logger, A.Fake <IDocumentationLinker>()); typeRegistry.BindType("int", typeRegistry.ImportType(typeof(int))); var marshalledElementFactory = new MarshalledElementFactory(Logger, new GlobalNamespaceProvider(), typeRegistry); var csReturnValue = marshalledElementFactory.Create(cppReturnValue); Assert.Equal(typeRegistry.ImportType(typeof(IntPtr)), csReturnValue.PublicType); Assert.Equal(typeRegistry.ImportType(typeof(IntPtr)), csReturnValue.MarshalType); Assert.True(csReturnValue.HasPointer); }
public CsReturnValue(Ioc ioc, CppReturnValue cppReturnValue) : base(ioc, cppReturnValue, "__result__") { }
public CsReturnValue(CppReturnValue cppReturnValue) : base(cppReturnValue, "__result__") { }
public CsReturnValue Create(CppReturnValue cppReturnValue) { return(CreateCore <CsReturnValue>(cppReturnValue)); }