private static bool TypeIsCollection(Type t, out Type itemType) { return(ICollectionResolver.TypeIsCollection(t, out ConstructorInfo constructor, out itemType, out bool isImplGenerIList, out bool IsImplIList, out bool isImplGenerICollec, out bool isImplIReadOnlyList)); }
public void ICollectionImpl_ObjectItemTypeColloctionCtor_IsCollection() { ICollectionResolver.TypeIsCollection(typeof(_ICollection_ObjectItemTypeColloctionCtor), out ConstructorInfo constructor, out Type itemType, out bool isImplGenerIList, out bool IsImplIList, out bool isImplGenerICollec, out bool isImplIReadOnlyList).IsTrue(); itemType.Is(typeof(object)); constructor.Is(typeof(_ICollection_ObjectItemTypeColloctionCtor).GetConstructor(new Type[] { typeof(List <object>) })); }
public void IListImpl_EmptyParasCtor_IsCollection() { ICollectionResolver.TypeIsCollection(typeof(_IList_EmptyParasCtor), out ConstructorInfo constructor, out Type itemType, out bool isImplGenerIList, out bool IsImplIList, out bool isImplGenerICollec, out bool isImplIReadOnlyList).IsTrue(); itemType.Is(typeof(object)); constructor.GetParameters().Length.Is(0); }
public void GenerIEnumerableWithNonGenerICollectionImpl_SameItemTypeColloctionCtor_IsCollection() { ICollectionResolver.TypeIsCollection(typeof(_GenerIEnumerableWithNonGenerICollection_Int_SameItemTypeColloctionCtor), out ConstructorInfo constructor, out Type itemType, out bool isImplGenerIList, out bool IsImplIList, out bool isImplGenerICollec, out bool isImplIReadOnlyList).IsTrue(); itemType.Is(typeof(int)); constructor.Is(typeof(_GenerIEnumerableWithNonGenerICollection_Int_SameItemTypeColloctionCtor).GetConstructor(new Type[] { typeof(List <int>) })); }
public void ListIsSpecifiedCapacityCtor() { ICollectionResolver.TypeIsCollection(typeof(List <int>), out ConstructorInfo constructor, out Type itemType, out bool isImplGenerIList, out bool IsImplIList, out bool isImplGenerICollec, out bool isImplIReadOnlyList).IsTrue(); itemType.Is(typeof(int)); constructor.Is(typeof(List <int>).GetConstructor(new Type[] { typeof(int) })); }