Exemplo n.º 1
0
        protected virtual void Dispose(bool disposing)
        {
            FirstChild?.Dispose();
            NextSibling?.Dispose();

            FirstChild = NextSibling = ParentNode = PreviousSibling = null;
        }
Exemplo n.º 2
0
        protected virtual void Dispose(bool disposing)
        {
            RemotingServices.Disconnect(this);

            FirstChild?.Dispose();
            NextSibling?.Dispose();

            FirstChild = NextSibling = ParentNode = PreviousSibling = null;
        }
Exemplo n.º 3
0
        public static void test_multiple_child_classes()
        {
            FirstChild obj = new FirstChild();

            Test.AssertEquals(1, obj.receivedValue);
            SecondChild obj2 = new SecondChild();

            Test.AssertEquals(2, obj2.receivedValue);

            obj.Dispose();
            obj = new FirstChild();
            Test.AssertEquals(1, obj.receivedValue);
            obj2.Dispose();
            obj.Dispose();
        }
Exemplo n.º 4
0
        protected virtual void Dispose(bool disposing)
        {
            RemotingServices.Disconnect(this);

            FirstChild?.Dispose();
            NextSibling?.Dispose();

            FirstChild = NextSibling = ParentNode = PreviousSibling = null;

            if (itemsToDispose != null)
            {
                foreach (var properties in itemsToDispose)
                {
                    properties.Dispose();
                }
                itemsToDispose = null;
            }
        }
Exemplo n.º 5
0
 public void Dispose()
 {
     Block?.Dispose();
     FirstChild?.Dispose();
     SecondChild?.Dispose();
 }