예제 #1
0
        public Person(SharedState sharedState)
        {
            observableObject = new ObservableObject(nameof(Person), sharedState.GetEnhancer(typeof(DeepEnhancer)), sharedState);
            observableObject.AddObservableProperty <string>(nameof(FirstName));
            observableObject.AddObservableProperty <string>(nameof(LastName));

            observableObject.AddComputedMember(nameof(FullName3), new ComputedValueOptions <string>(this.Getter, nameof(FullName3))
            {
                Context          = this,
                KeepAlive        = false,
                RequiresReaction = false,
                EqualityComparer = new ReferenceEqualityComparer <string>(),
                Setter           = this.Setter,
            });

            testAction = sharedState.CreateAction("ChangeBothNames", this, new Action <string, string>(this.ChangeBothNames));
        }