Boo.Lang.Compiler.TypeSystem.GenericsServices.FindConstructedType C# (CSharp) Method

FindConstructedType() public static method

Finds a single constructed occurance of a specified generic definition in the specified type's inheritence hierarchy.
public static FindConstructedType ( IType type, IType definition ) : IType
type IType
definition IType
return IType
        public static IType FindConstructedType(IType type, IType definition)
        {
            IType result = null;
            foreach (IType candidate in FindConstructedTypes(type, definition))
            {
                if (result == null) result = candidate;
                else if (result != candidate) return null;
            }
            return result;
        }