Example #1
0
        protected CsCallable(CppCallable callable, string name) : base(callable, name)
        {
            var tag = callable?.Rule;

            CheckReturnType     = tag?.MethodCheckReturnType ?? CheckReturnType;
            ForceReturnType     = tag?.ParameterUsedAsReturnType ?? ForceReturnType;
            AlwaysReturnHResult = tag?.AlwaysReturnHResult ?? AlwaysReturnHResult;
            RequestRawPtr       = tag?.RawPtr ?? RequestRawPtr;

            if (callable == null)
            {
                return;
            }

            CppSignature         = callable.ToString();
            ShortName            = callable.ToShortString();
            CppCallingConvention = callable.CallingConvention;
        }
Example #2
0
        protected CsCallable(Ioc ioc, CppCallable callable, string name) : base(callable, name)
        {
            Ioc = ioc ?? throw new ArgumentNullException(nameof(ioc));

            if (callable == null)
            {
                return;
            }

            var tag = callable.Rule;

            CheckReturnType     = tag.MethodCheckReturnType ?? CheckReturnType;
            ForceReturnType     = tag.ParameterUsedAsReturnType ?? ForceReturnType;
            AlwaysReturnHResult = tag.AlwaysReturnHResult ?? AlwaysReturnHResult;
            RequestRawPtr       = tag.RawPtr ?? RequestRawPtr;

            CppSignature         = callable.ToString();
            ShortName            = callable.ToShortString();
            CppCallingConvention = callable.CallingConvention;
        }