Unity.IL2CPP.RuntimeInvokerCollectorComponent.GetIndex C# (CSharp) Method

GetIndex() public method

public GetIndex ( MethodReference method ) : int
method Mono.Cecil.MethodReference
return int
        public int GetIndex(MethodReference method)
        {
            int num3;
            if (method.HasGenericParameters || method.DeclaringType.HasGenericParameters)
            {
                return -1;
            }
            if (GenericSharingAnalysis.CanShareMethod(method))
            {
                method = GenericSharingAnalysis.GetSharedMethod(method);
            }
            Unity.IL2CPP.ILPreProcessor.TypeResolver resolver = new Unity.IL2CPP.ILPreProcessor.TypeResolver(method.DeclaringType as GenericInstanceType, method as GenericInstanceMethod);
            TypeReference[] key = new TypeReference[method.Parameters.Count + 1];
            key[0] = InvokerReturnTypeFor(resolver.ResolveReturnType(method));
            for (int i = 0; i < method.Parameters.Count; i++)
            {
                key[i + 1] = InvokerParameterTypeFor(resolver.ResolveParameterType(method, method.Parameters[i]));
            }
            if (!this._runtimeInvokerData.TryGetValue(key, out num3))
            {
                return -1;
            }
            return num3;
        }
RuntimeInvokerCollectorComponent