Esempio n. 1
0
            // This is not meant to be used directly.
            public static SecondCase Deserialize(Reader reader, Path path = null, bool shouldNotify = false)
            {
                var secondCase = new SecondCase(path);

                secondCase.ReplaceAll(reader, shouldNotify);
                return(secondCase);
            }
Esempio n. 2
0
            internal static SecondCase Deserialize(IReader reader, Path path = null)
            {
                var secondCase = new SecondCase(path);

                secondCase.Replace(reader);
                return(secondCase);
            }
Esempio n. 3
0
        public void ReplaceAt(UInt32 tag, WireType wireType, IReader reader, bool shouldNotify)
        {
            switch (tag)
            {
            case 0: this.UpdateAndNotify(0, FirstCase.Deserialize(reader, this.Path.GetNested(0)), shouldNotify); break;

            case 1: this.UpdateAndNotify(1, SecondCase.Deserialize(reader, this.Path.GetNested(1)), shouldNotify); break;

            default: reader.SkipToEnd(); break;
            }
        }
Esempio n. 4
0
        public void ReplaceAt(UInt16 tag, WireType wireType, Reader reader, bool shouldNotify)
        {
            reader = !reader.Eof() ? reader : new Reader(new byte[0]);

            switch (tag)
            {
            case 0: this.NotifyAndUpdate(0, FirstCase.Deserialize(reader, this.Path.Nested(0)), shouldNotify); break;

            case 1: this.NotifyAndUpdate(1, SecondCase.Deserialize(reader, this.Path.Nested(1)), shouldNotify); break;

            default: reader.Exhaust(); break;
            }
        }