AmericasCup.Data.BoatStatus.Read C# (CSharp) Метод

Read() публичный статический Метод

public static Read ( byte buf, int c, BoatStatus b ) : int
buf byte
c int
b BoatStatus
Результат int
        public static int Read(byte[] buf, int c, BoatStatus b)
        {
            b.BoatId = BitConverter.ToUInt32(buf, c);
            c += 4;

            b.Status = (BoatStatusEnum)buf[c++];
            b.LegNumber = buf[c++];
            b.PenaltiesAwarded = buf[c++];
            b.PenaltiesServed = buf[c++];

            b.ExpectedTimeAtNextMark = new DateTime(1970, 1, 1).AddMilliseconds(BitConverter.ToUInt64(
                new byte[] { buf[c++], buf[c++], buf[c++], buf[c++], buf[c++], buf[c++], 0, 0 }, 0));

            b.EstimatedTimeAtFinish = new DateTime(1970, 1, 1).AddMilliseconds(BitConverter.ToUInt64(
                new byte[] { buf[c++], buf[c++], buf[c++], buf[c++], buf[c++], buf[c++], 0, 0 }, 0));

            return c;
        }

Same methods

BoatStatus::Read ( byte buf ) : BoatStatus
BoatStatus