Beispiel #1
0
        public bool Applies()
        {
            var isCollection = TypeOf <T> .IsImplementationOfOpenGeneric(typeof(IProducerConsumerCollection <>)) ||
                               TypeOf <T> .IsImplementationOfOpenGeneric(typeof(ICollection <>));

            return(TypeOf <T> .IsConcrete() &&
                   typeof(T).IsGenericType &&
                   isCollection &&
                   TypeOf <T> .HasParameterlessConstructor());
        }