NetworkingPeer.CheckTypeMatch C# (CSharp) Method

CheckTypeMatch() private method

Check if all types match with parameters. We can have more paramters then types (allow last RPC type to be different).
private CheckTypeMatch ( ParameterInfo methodParameters, Type callParameterTypes ) : bool
methodParameters ParameterInfo
callParameterTypes Type
return bool
    private bool CheckTypeMatch(ParameterInfo[] methodParameters, Type[] callParameterTypes)
    {
        if (methodParameters.Length < callParameterTypes.Length)
        {
            return false;
        }

        for (int index = 0; index < callParameterTypes.Length; index++)
        {
            Type type = methodParameters[index].ParameterType;
            //todo: check metro type usage
            if (callParameterTypes[index] != null && !type.Equals(callParameterTypes[index]))
            {
                return false;
            }
        }

        return true;
    }
NetworkingPeer