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; }
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; }