Пример #1
0
        public Type GenerateResultType(IMember member)
        {
            Type declarationType = DeclarationTypeProvider.ProvideDeclarartionType(member);
            IEnumerable <Attribute> attributes = AttributesFinder.FindAttributes <Attribute>(member);
            Attribute attr = FactoryResultAttributeProvider.ProvideAttributeOrNull(attributes);

            if (attr == null)
            {
                return(declarationType);
            }

            return(FactoryTypeProvider.ProvideType(declarationType, attr));
        }
Пример #2
0
 public Type ProvideResultType(IMember member)
 {
     return(Finder.FindAttributes <FactoryResult>(member)
            .First()
            .ResultType);
 }
Пример #3
0
        public bool Check(IMember member)
        {
            bool any = Finder.FindAttributes <FactoryResult>(member).Any();

            return(any);
        }