コード例 #1
0
 public void Sync_ShouldWorkWhenEnabled()
 {
     using (new SyncAnimalsAndLimbs())
     {
         var animal = new Animal();
         animal.Limbs.Count.Should().Be(0);
         new Limb("Front Left", animal);
         animal.Limbs.Count.Should().Be(1);
         new Limb("Front Right", animal);
         animal.Limbs.Count.Should().Be(2);
     }
 }
コード例 #2
0
 public Limb(string name, Animal animal)
 {
     Animal = new ReactiveProperty<Animal>(animal);
     Name = new ReactiveProperty<string>(name);
     this.Constructed();
 }