コード例 #1
0
 public override void SetUp()
 {
     _fieldNullBuffer = new byte[WireFormatting.GetFieldValueByteCount(null)];
     WireFormatting.WriteFieldValue(ref _fieldNullBuffer.Span.GetStart(), null);
     _fieldIntBuffer = new byte[WireFormatting.GetFieldValueByteCount(_intObject)];
     WireFormatting.WriteFieldValue(ref _fieldIntBuffer.Span.GetStart(), _intObject);
     _fieldStringBuffer = new byte[WireFormatting.GetFieldValueByteCount(_shortString)];
     WireFormatting.WriteFieldValue(ref _fieldStringBuffer.Span.GetStart(), _shortString);
     _fieldArrayBuffer = new byte[WireFormatting.GetFieldValueByteCount(_byteArray)];
     WireFormatting.WriteFieldValue(ref _fieldArrayBuffer.Span.GetStart(), _byteArray);
     _fieldDictBuffer = new byte[WireFormatting.GetFieldValueByteCount(_emptyDictionary)];
     WireFormatting.WriteFieldValue(ref _fieldDictBuffer.Span.GetStart(), _emptyDictionary);
     _fieldBinaryTableValueBuffer = new byte[WireFormatting.GetFieldValueByteCount(_binaryTableValue)];
     WireFormatting.WriteFieldValue(ref _fieldBinaryTableValueBuffer.Span.GetStart(), _binaryTableValue);
 }
コード例 #2
0
 public int StringGetSize() => WireFormatting.GetFieldValueByteCount(_shortString);
コード例 #3
0
 public int IntGetSize() => WireFormatting.GetFieldValueByteCount(_intObject);
コード例 #4
0
 public int NullGetSize() => WireFormatting.GetFieldValueByteCount(null);
コード例 #5
0
 public int LongstrGetSizePopulated() => WireFormatting.GetFieldValueByteCount(_longString);
コード例 #6
0
 public int LongstrGetSizeEmpty() => WireFormatting.GetFieldValueByteCount(string.Empty);
コード例 #7
0
 public int BinaryTableValueGetSize() => WireFormatting.GetFieldValueByteCount(_binaryTableValue);
コード例 #8
0
 public int DictGetSize() => WireFormatting.GetFieldValueByteCount(_emptyDictionary);
コード例 #9
0
 public int ArrayGetSize() => WireFormatting.GetFieldValueByteCount(_byteArray);