예제 #1
0
        public static IMicheline UnforgeMicheline(ForgedReader reader)
        {
            var micheline = reader.ReadMicheline();

            if (!reader.EndOfStream)
            {
                throw new ArgumentException($"Did not reach EOS (position: {reader.StreamPosition})");
            }

            return(micheline);
        }
예제 #2
0
        public MichelineArray ReadMichelineArray()
        {
            var arrayData = ReadArray();

            var res = new MichelineArray();

            using (var arr = new ForgedReader(arrayData))
            {
                while (!arr.EndOfStream)
                {
                    res.Add(arr.ReadMicheline());
                }
            }

            return(res);
        }