Exemple #1
0
        public Person( IChangeTrackingService memento, ChangeTrackingRegistration registration, TransientRegistration transientRegistration )
            : base( memento, registration )
        {
            this.transientRegistration = transientRegistration;

            this.nameRejectCallback = ( pcr ) =>
            {
                this.CacheChangeOnRejectCallback( "property-name", this.Name, nameRejectCallback, null, pcr );
                this._name = pcr.CachedValue;
            };
        }
Exemple #2
0
        public Person(IChangeTrackingService memento, ChangeTrackingRegistration registration, TransientRegistration transientRegistration)
            : base(memento, registration)
        {
            this.transientRegistration = transientRegistration;

            this.nameRejectCallback = (pcr) =>
            {
                this.CacheChangeOnRejectCallback("property-name", this.Name, nameRejectCallback, null, pcr);
                this._name = pcr.CachedValue;
            };
        }
 public FakeMementoEntity(IChangeTrackingService memento, ChangeTrackingRegistration registration)
     : base(memento, registration)
 {
 }
 public FakeMementoEntity(ChangeTrackingRegistration registration)
     : base(registration)
 {
 }
Exemple #5
0
 /// <summary>
 /// Registers this instance as transient.
 /// </summary>
 protected void RegisterTransient()
 {
     this.registration = ChangeTrackingRegistration.AsTransient;
 }
Exemple #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MementoEntity" /> class.
 /// </summary>
 /// <param name="memento">The memento.</param>
 /// <param name="registration">The registration.</param>
 protected MementoEntity(IChangeTrackingService memento, ChangeTrackingRegistration registration)
     : base()
 {
     this.registration        = registration;
     ((IMemento)this).Memento = memento;
 }
Exemple #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MementoEntity" /> class.
 /// </summary>
 /// <param name="registration">The registration.</param>
 protected MementoEntity(ChangeTrackingRegistration registration)
     : this(null, registration)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AbstractMementoViewModel" /> class.
 /// </summary>
 /// <param name="registration">The registration.</param>
 protected AbstractMementoViewModel(ChangeTrackingRegistration registration)
     : base(registration)
 {
     this.ValidationErrors = new ObservableCollection <ValidationError>();
     this.RunValidationOnPropertyChanged = true;
 }