public static TimePoint Decode(XdrDataInputStream stream)
        {
            TimePoint decodedTimePoint = new TimePoint();

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

            decodedTimeBounds.MinTime = TimePoint.Decode(stream);
            decodedTimeBounds.MaxTime = TimePoint.Decode(stream);
            return(decodedTimeBounds);
        }
        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);
        }
        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);
        }
Beispiel #5
0
 public static void Encode(XdrDataOutputStream stream, TimeBounds encodedTimeBounds)
 {
     TimePoint.Encode(stream, encodedTimeBounds.MinTime);
     TimePoint.Encode(stream, encodedTimeBounds.MaxTime);
 }
 public static void Encode(XdrDataOutputStream stream, TimePoint encodedTimePoint)
 {
     Uint64.Encode(stream, encodedTimePoint.InnerValue);
 }