Exemplo n.º 1
0
        public static TimePoint Decode(XdrDataInputStream stream)
        {
            TimePoint decodedTimePoint = new TimePoint();

            decodedTimePoint.InnerValue = Uint64.Decode(stream);
            return(decodedTimePoint);
        }
Exemplo n.º 2
0
        public static TimeBounds Decode(XdrDataInputStream stream)
        {
            TimeBounds decodedTimeBounds = new TimeBounds();

            decodedTimeBounds.MinTime = TimePoint.Decode(stream);
            decodedTimeBounds.MaxTime = TimePoint.Decode(stream);
            return(decodedTimeBounds);
        }
Exemplo n.º 3
0
        public static void Encode(XdrDataOutputStream stream, StellarValue encodedStellarValue)
        {
            Hash.Encode(stream, encodedStellarValue.TxSetHash);
            TimePoint.Encode(stream, encodedStellarValue.CloseTime);
            int upgradessize = encodedStellarValue.Upgrades.Length;

            stream.WriteInt(upgradessize);
            for (int i = 0; i < upgradessize; i++)
            {
                UpgradeType.Encode(stream, encodedStellarValue.Upgrades[i]);
            }
            StellarValueExt.Encode(stream, encodedStellarValue.Ext);
        }
Exemplo n.º 4
0
        public static StellarValue Decode(XdrDataInputStream stream)
        {
            StellarValue decodedStellarValue = new StellarValue();

            decodedStellarValue.TxSetHash = Hash.Decode(stream);
            decodedStellarValue.CloseTime = TimePoint.Decode(stream);
            int upgradessize = stream.ReadInt();

            decodedStellarValue.Upgrades = new UpgradeType[upgradessize];
            for (int i = 0; i < upgradessize; i++)
            {
                decodedStellarValue.Upgrades[i] = UpgradeType.Decode(stream);
            }
            decodedStellarValue.Ext = StellarValueExt.Decode(stream);
            return(decodedStellarValue);
        }
Exemplo n.º 5
0
 public static void Encode(XdrDataOutputStream stream, TimeBounds encodedTimeBounds)
 {
     TimePoint.Encode(stream, encodedTimeBounds.MinTime);
     TimePoint.Encode(stream, encodedTimeBounds.MaxTime);
 }
Exemplo n.º 6
0
 public static void Encode(XdrDataOutputStream stream, TimePoint encodedTimePoint)
 {
     Uint64.Encode(stream, encodedTimePoint.InnerValue);
 }