示例#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;
        }
示例#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;
        }
示例#3
0
        private static async Task DocumentCallable(this IDocProvider docProvider, DocItemCache cache, CppCallable callable, string name = null)
        {
            var docItem = await docProvider.DocumentElement(cache, callable, name : name);

            callable.ReturnValue.Description = docItem.Return;
        }