public void Write(int value, FieldLength fieldLength) { var data = BitConverter.GetBytes(value); Write(data, fieldLength); }
public Task WriteAsync(sbyte value, FieldLength fieldLength, CancellationToken cancellationToken) { var data = new[] { (byte)value }; return(WriteAsync(data, fieldLength, cancellationToken)); }
public Task WriteAsync(ushort value, FieldLength fieldLength, CancellationToken cancellationToken) { var data = BitConverter.GetBytes(value); return(WriteAsync(data, fieldLength, cancellationToken)); }
public void Write(sbyte value, FieldLength fieldLength) { var data = new[] { (byte)value }; Write(data, fieldLength); }
public Task WriteAsync(char value, FieldLength fieldLength, CancellationToken cancellationToken) { var data = _encoding.GetBytes(new[] { value }); return(WriteAsync(data, fieldLength, cancellationToken)); }
public void OnMemberDeserialized(ValueNode sender, string name, object value, BinarySerializationContext context, FieldLength offset, FieldLength localOffset) { var handle = MemberDeserialized; handle?.Invoke(sender, new MemberSerializedEventArgs(name, value, context, offset, localOffset)); }
public Task <FieldLength> ReadAsync(byte[] data, FieldLength fieldLength, CancellationToken cancellationToken) { var length = fieldLength ?? data.Length; return(InputStream.ReadAsync(data, length, cancellationToken)); }
public FieldLength Read(byte[] data, FieldLength fieldLength) { var length = fieldLength ?? data.Length; return(InputStream.Read(data, length)); }