public static string GetSignature(MethodReference method, MethodReference interfaceMethod, Unity.IL2CPP.ILPreProcessor.TypeResolver typeResolver, string typeName = null)
        {
            StringBuilder builder     = new StringBuilder();
            MarshalType   marshalType = !interfaceMethod.DeclaringType.Resolve().IsWindowsRuntime ? MarshalType.COM : MarshalType.WindowsRuntime;

            if (string.IsNullOrEmpty(typeName))
            {
                builder.Append("virtual il2cpp_hresult_t STDCALL ");
            }
            else
            {
                builder.Append("il2cpp_hresult_t ");
                builder.Append(typeName);
                builder.Append("::");
            }
            builder.Append(Naming.ForMethodNameOnly(interfaceMethod));
            builder.Append('(');
            builder.Append(BuildMethodParameterList(method, interfaceMethod, typeResolver, marshalType, true));
            builder.Append(')');
            return(builder.ToString());
        }
 public static string GetICallMethodVariable(MethodDefinition method) =>
 $"{Naming.ForVariable(method.ReturnType)} (*{Naming.ForMethodNameOnly(method)}_ftn) ({FormatParameters(method, ParameterFormat.WithType, method.IsStatic, false)})";
Example #3
0
 protected virtual string GetMethodNameInGeneratedCode() =>
 Naming.ForMethodNameOnly(this._interopMethod);
Example #4
0
 internal static string NonUniqueShortNameFor(MethodReference method) =>
 Naming.ForMethodNameOnly(method);