Exemplo n.º 1
0
            public void BindにBoundクラスを追加()
            {
                BindClass  bind  = new BindClass();
                BoundClass bound = new BoundClass(bind);

                Assert.AreEqual(bind.Bound.Value, bound);
            }
Exemplo n.º 2
0
            public void BindにBoundsクラスを追加()
            {
                BindClass   bind  = new BindClass();
                BoundsClass bound = new BoundsClass(bind);

                Assert.AreEqual(bound, bind.BoundsCollection[0]);
                Assert.AreEqual(1, bind.BoundsCollection.Count);
            }
Exemplo n.º 3
0
            public void BindからBoundクラスを削除()
            {
                BindClass  bind  = new BindClass();
                BoundClass bound = new BoundClass(bind);

                bind.Bound.Value = null;
                Assert.IsNull(bind.Bound.Value);
                Assert.IsNull(bind.Children.Where(x => x is BoundClass).FirstOrDefault());
            }
Exemplo n.º 4
0
            public void BindのBoundクラスを置換()
            {
                BindClass  bind   = new BindClass();
                BoundClass bound1 = new BoundClass(bind);
                BoundClass bound2 = new BoundClass(bind);

                Assert.AreEqual(bound2, bind.Children.Where(x => x is BoundClass).FirstOrDefault());
                Assert.AreEqual(bound2, bind.Bound.Value);
                Assert.IsNull(bind.Children.Where(x => x == bound1).FirstOrDefault());
            }
Exemplo n.º 5
0
 public BoundsClass(BindClass parent, int index)
 {
     parent.BoundsCollection.Insert(index, this);
 }
Exemplo n.º 6
0
 public BoundsClass(BindClass parent)
 {
     parent.BoundsCollection.Add(this);
 }
Exemplo n.º 7
0
 public BoundClass(BindClass parent) : this()
 {
     parent.Bound.Value = this;
 }