Exemple #1
0
        private void multiLevelProperty()
        {
            var person              = new Person("FirstName", "LastName");
            var currentUser         = new StoredProperty <Person>(person);
            var currentUserFullName = new MultiLevelProperty <string>(() => currentUser.Value.fullName);

            Console.WriteLine($"Welcome, {currentUserFullName.Value}"); // Welcome, FirstName LastName
        }
Exemple #2
0
        public TestMultiLevelProperty()
        {
            participant            = new Participant();
            participant.Name.Value = "A";
            roster = new Roster();
            roster.CurrentParticipant.Value = participant;

            currentParticipantName = new MultiLevelProperty <string>(() => roster.CurrentParticipant.Value.Name);
            currentParticipantName.PropertyChanged += delegate { changeEventsFired++; };
        }