Exemplo n.º 1
0
        public F()
        {
            this.classVersion = F.CLASS_VERSION;

            BB bbAA = new BB();

            this.AARef = new AA(bbAA);

            this.AAARef = new AAA();
            BB bbAAA = new BB();

            this.AAARef.BBRef = bbAAA;
        }
Exemplo n.º 2
0
        protected F(SerializationInfo info, StreamingContext ctxt)
        {
            this.classVersion = F.CLASS_VERSION;
            int persistedClassVersion = (int)info.GetValue("ClassVersionF", typeof(int));

            switch (persistedClassVersion)
            {
            case 1:
                // the indirect containment (BB referencing AA) is set automatically by deserialization
                this.AARef = (AA)info.GetValue("AARef", typeof(AA));

                // the indirect containment (BB referencing AAA) is set automatically by deserialization
                this.AAARef = (AAA)info.GetValue("AAARef", typeof(AAA));

                break;
            }
        }