Ejemplo n.º 1
0
        public static void CacheAnywhereDecoratorsForMember(this BaseMightyMember mightyMember, MemberInfo memberInfo,
                                                            IEnumerable <BaseMightyAttribute> wrappedAttributes)
        {
            var decoratorAttributes = new List <BaseGlobalDecoratorAttribute>();

            var any = PopulateAttributesListWithException(decoratorAttributes,
                                                          memberInfo.GetCustomAttributes <BaseGlobalDecoratorAttribute>(true), typeof(IDrawAnywhereAttribute), true);

            any = PopulateAttributesListWithException(decoratorAttributes, wrappedAttributes, typeof(IDrawAnywhereAttribute), true) || any;

            if (any)
            {
                mightyMember.SetAttributes(decoratorAttributes.ToArray());
            }
        }