AsmResolver.Net.SignatureComparer.MatchManyTypes C# (CSharp) Метод

MatchManyTypes() публичный Метод

Determines whether two enumerations of type signatures are considered equal according to their signatures.
public MatchManyTypes ( IEnumerable types1, IEnumerable types2 ) : bool
types1 IEnumerable The first type enumeration to compare.
types2 IEnumerable The second type enumeration to compare.
Результат bool
        public bool MatchManyTypes(IEnumerable<TypeSignature> types1, IEnumerable<TypeSignature> types2)
        {
            if (types1 == null && types2 == null)
                return true;
            if (types1 == null || types2 == null)
                return false;

            var types1Array = types1.ToArray();
            var types2Array = types2.ToArray();

            if (types1Array.Length != types2Array.Length)
                return false;

            for (int i =0; i < types1Array.Length; i++)
            {
                if (!MatchTypes(types1Array[i], types2Array[i]))
                    return false;
            }

            return true;
        }