Пример #1
0
        public static Type Get_DecoratorType(IAdditionalViewControlsRule additionalViewControlsRule)
        {
            ITypeInfo decoratorType =
                ModelAdditionalViewControlsRuleDomainLogic.GetDecorators().Where(info => info.Type.GetCustomAttributes(typeof(TypeDecorator), true).OfType <TypeDecorator>().Where(
                                                                                     decorator => decorator.IsDefaultDecorator).Count() > 0).FirstOrDefault();

            return(decoratorType != null ? decoratorType.Type : typeof(NotAvaliableInThisPlatform));
        }
Пример #2
0
        public static Type Get_ControlType(IAdditionalViewControlsRule additionalViewControlsRule)
        {
            TypeDecorator decorator = ModelAdditionalViewControlsRuleDomainLogic.GetTypeDecorator(additionalViewControlsRule.DecoratorType, additionalViewControlsRule.Position);

            return(decorator != null ? decorator.DefaultType : typeof(NotAvaliableInThisPlatform));
        }