Example #1
0
 public VisualEditorStyle Init()
 {
     _attributeItems = new InitPropertyValue <IEnumerable <VeStyleAggregationListItem> >(() => Deserialize(Attributes));
     _stylesItems    = new InitPropertyValue <IEnumerable <VeStyleAggregationListItem> >(() => Deserialize(Styles));
     On = true;
     return(this);
 }
Example #2
0
        public void GetterSetterCheck_InitializerAndCustomSetterIsDefined_CorrectResult()
        {
            var value = new InitPropertyValue <int>(_initializer, _customSetter);

            Assert.AreEqual(InitializerResult, value.Value);

            const int newValue = 3 * InitializerResult;

            value.Value = newValue;
            Assert.AreEqual(CustomSetterResult, value.Value);
        }
Example #3
0
 internal Site()
 {
     AllowUserSessions              = true;
     AssemblingType                 = Constants.AssemblingType.AspDotNet;
     IsLive                         = true;
     OnScreenFieldBorder            = OnScreenBorderMode.OnMouseOver;
     OnScreenObjectBorder           = OnScreenBorderMode.Never;
     ProceedMappingWithDb           = true;
     ProceedDbIndependentGeneration = true;
     ContextClassName               = DefaultContextClassName;
     ConnectionStringName           = DefaultConnectionStringName;
     _externalCssItems              = new InitPropertyValue <IEnumerable <ExternalCss> >(() => ExternalCssHelper.GenerateExternalCss(ExternalCss));
 }
Example #4
0
        public void GetterSetterCheck_InitializerAndCustomSetterIsUndefined_CorrectResult()
        {
            var value = new InitPropertyValue <int>();

            // нет инициализации - значение по умолчанию
            Assert.AreEqual(default(int), value.Value);

            // Устанавливаем initializer
            value.Initializer = _initializer;

            Assert.AreEqual(InitializerResult, value.Value);

            const int newValue = 3 * InitializerResult;

            value.Value = newValue;
            Assert.AreEqual(newValue, value.Value);
        }
Example #5
0
        public void GetterSetterCheck_InitializerAndCustomSetterDefineLater_CorrectResult()
        {
            var value = new InitPropertyValue <int>();

            // нет инициализации - значение по умолчанию
            Assert.AreEqual(default(int), value.Value);

            // Проверка get/set
            const int newValue = 3 * InitializerResult;

            value.Value = newValue;
            Assert.AreEqual(newValue, value.Value);

            // Устанавливаем initializer
            value.Initializer = _initializer;

            // Так как уже был set, то initializer не применяется
            Assert.AreEqual(newValue, value.Value);
        }
Example #6
0
 public User()
 {
     _contentDefaultFilters      = new InitPropertyValue <IEnumerable <UserDefaultFilter> >(() => QPContext.CurrentUnityContainer.Resolve <IUserService>().GetContentDefaultFilters(Id));
     EnableContentGroupingInTree = true;
 }
Example #7
0
 public XmlDbUpdateRecordedAction()
 {
     _backendAction = new InitPropertyValue <BackendAction>(() => BackendActionService.GetByCode(Code));
 }
Example #8
0
 public BllObject()
 {
     _contentForm = new InitPropertyValue <ContentForm>(() => InitContentForm());
     _container   = new InitPropertyValue <Container>(() => InitContainer());
     InitDefaultValues();
 }
Example #9
0
 public User()
 {
     _contentDefaultFilters      = new InitPropertyValue <IEnumerable <UserDefaultFilter> >(() => UserRepository.GetContentDefaultFilters(Id));
     EnableContentGroupingInTree = true;
 }
Example #10
0
 public ContentConstraintRule()
 {
     _field = new InitPropertyValue <Field>(() => FieldRepository.GetById(FieldId));
 }
Example #11
0
 public PageTemplate()
 {
     _additionalNamespaceItems = new InitPropertyValue <IEnumerable <AdditionalNamespace> >(ParseUsings);
 }