Пример #1
0
        public static SCPHistoryEntry Decode(IByteReader stream)
        {
            SCPHistoryEntry decodedSCPHistoryEntry = new SCPHistoryEntry();

            decodedSCPHistoryEntry.Discriminant = XdrEncoding.DecodeInt32(stream);
            switch (decodedSCPHistoryEntry.Discriminant)
            {
            case 0:
                decodedSCPHistoryEntry.V0 = SCPHistoryEntryV0.Decode(stream);
                break;
            }
            return(decodedSCPHistoryEntry);
        }
Пример #2
0
        public static SCPHistoryEntry Decode(XdrDataInputStream stream)
        {
            SCPHistoryEntry decodedSCPHistoryEntry = new SCPHistoryEntry();
            int             discriminant           = stream.ReadInt();

            decodedSCPHistoryEntry.Discriminant = discriminant;
            switch (decodedSCPHistoryEntry.Discriminant)
            {
            case 0:
                decodedSCPHistoryEntry.V0 = SCPHistoryEntryV0.Decode(stream);
                break;
            }
            return(decodedSCPHistoryEntry);
        }