public override void VisitLock(Lock @lock) { _stream.AppendLong(@lock.Id); _stream.AppendByte((byte)_lockType); _stream.AppendByte((byte)@lock.State); _stream.AppendByte((byte)(@lock.Primary ? 1 : 0)); _stream.AppendLong((long)@lock.Timer.Duration.TotalMilliseconds); _stream.AppendLong((long)@lock.Timer.Elapsed.TotalMilliseconds); _stream.AppendLong(@lock.Owner.Eid); _stream.AppendStream(_target); }