public void Initialize(BehaviorInitializationContext context)
 {
     _property             = context.Property;
     _resultManager        = new ValidationResultManager(context, ValidationResultGroup, _stage);
     _invalidValueCache    = new DynamicFieldAccessor <TValue>(context, InvalidValueGroup);
     _validationController = new DynamicFieldAccessor <ValidationController>(context, ValidationControllerGroup);
     this.InitializeNext(context);
 }
        public virtual void Initialize(BehaviorInitializationContext context)
        {
            _cache       = new DynamicFieldAccessor <TValue>(context, ValueCacheGroup);
            _isProviding = new DynamicFieldAccessor <bool>(context, IsProvidingGroup);
            _property    = context.Property;
            SetInitialized();

            this.InitializeNext(context);
        }
        //public ValidationResult GetValidationResult(IBehaviorContext vm) {
        //   if (vm.FieldValues.HasValue(_conversionErrorField)) {
        //      return ValidationResult.Failure(vm.FieldValues.GetValue(_conversionErrorField));
        //   }
        //   IValidationBehavior next;
        //   return TryGetBehavior(out next) ?
        //      next.GetValidationResult(vm) :
        //      ValidationResult.Success();
        //}

        public void Initialize(BehaviorInitializationContext context)
        {
            _conversionErrorField = context.Fields.DefineField <string>(
                ConversionErrorGroup
                );
            _propertyName = context.Property.PropertyName;

            this.InitializeNext(context);
        }
예제 #4
0
        public void Initialize(BehaviorInitializationContext context)
        {
            if (UpdateFromSourceProperties == null)
            {
                UpdateFromSourceProperties = context.Descriptor.Properties;
            }

            if (UpdateSourceProperties == null)
            {
                UpdateSourceProperties = context.Descriptor.Properties;
            }

            SetInitialized();
            this.InitializeNext(context);
        }
 public void Initialize(BehaviorInitializationContext context)
 {
     _cache = new DynamicFieldAccessor <ResultCacheManager>(context, ViewModel.GeneralFieldGroup);
     this.InitializeNext(context);
 }
 public override void Initialize(BehaviorInitializationContext context)
 {
     _collectionSourceCache = new DynamicFieldAccessor <IEnumerable <TItemSource> >(context, CollectionSourceCacheGroup);
     base.Initialize(context);
 }
 public void Initialize(BehaviorInitializationContext context)
 {
     _property = (IVMPropertyDescriptor <TValue>)context.Property;
     this.InitializeNext(context);
 }
 public override void Initialize(BehaviorInitializationContext context)
 {
     base.Initialize(context);
     _property = context.Property;
 }
 public void Initialize(BehaviorInitializationContext context)
 {
     _vmDescriptor = context.Descriptor;
     this.InitializeNext(context);
 }
 public void Initialize(BehaviorInitializationContext context)
 {
     _state = new DynamicFieldAccessor <State>(context, StateGroup);
     this.InitializeNext(context);
 }
 public virtual void Initialize(BehaviorInitializationContext context)
 {
     _property = context.Property;
     this.InitializeNext(context);
     SetInitialized();
 }