Home
last modified time | relevance | path

Searched refs:ToByteArray (Results 1 – 22 of 22) sorted by relevance

/third_party/protobuf/csharp/src/Google.Protobuf.Test/
DUnknownFieldSetTest.cs80 emptyMessage.MergeFrom(message.ToByteArray()); in TestMergeCodedInput()
82 Assert.AreEqual(message.ToByteArray(), emptyMessage.ToByteArray()); in TestMergeCodedInput()
84 var newMessage = message.Descriptor.Parser.ParseFrom(emptyMessage.ToByteArray()); in TestMergeCodedInput()
95 emptyMessage.MergeFrom(message.ToByteArray()); in TestMergeMessage()
99 Assert.AreEqual(message.ToByteArray(), otherEmptyMessage.ToByteArray()); in TestMergeMessage()
109 emptyMessage.MergeFrom(message.ToByteArray()); in TestEquals()
121 emptyMessage.MergeFrom(message.ToByteArray()); in TestHashCode()
133 Assert.AreEqual(emptyMessage.ToByteArray(), otherEmptyMessage.ToByteArray()); in TestClone()
135 emptyMessage.MergeFrom(message.ToByteArray()); in TestClone()
138 Assert.AreEqual(message.ToByteArray(), otherEmptyMessage.ToByteArray()); in TestClone()
[all …]
DExtensionSetTest.cs35 var serialized = message.ToByteArray(); in TestMergeCodedInput()
72 var input = new CodedInputStream(message.ToByteArray()); in TryMergeFieldFrom_CodedInputStream()
DMessageParsingHelpers.cs83 var bytes = message.ToByteArray();
109 var bytes = message.ToByteArray(); in AssertWritingMessage()
DLegacyGeneratedCodeTest.cs57 var data = message.ToByteArray(); in IntermixingOfNewAndLegacyGeneratedCodeWorksWithCodedInputStream()
82 var data = message.ToByteArray(); in LegacyGeneratedCodeThrowsWithReadOnlySequence()
DByteStringTest.cs117 byte[] data = bs.ToByteArray(); in ToByteArrayCopiesContents()
165 Assert.AreEqual(data, bs.ToByteArray()); in FromBase64_WithText()
DGeneratedMessageTest.cs132 byte[] bytes = message.ToByteArray(); in RoundTrip_Empty()
248 byte[] bytes = message.ToByteArray(); in MapWithEmptyEntry()
664 var bytes = message.ToByteArray(); in OneofSerialization_NonDefaultValue()
681 var bytes = message.ToByteArray(); in OneofSerialization_DefaultValue()
719 var data = SampleMessages.CreateFullTestAllTypes().ToByteArray(); in DiscardUnknownFields_AllTypes()
DCodedInputStreamTest.cs315 byte[] rawBytes = message.ToByteArray(); in ReadWholeMessage_VaryingBlockSizes()
333 byte[] rawBytes = message.ToByteArray(); in ReadWholeMessage_VaryingBlockSizes_FromSequence()
500 … = CodedInputStream.CreateWithLimits(new MemoryStream(atRecursiveLimit.ToByteArray()), 1000000, Co… in MaliciousRecursion()
569 … MemoryStream ms = new MemoryStream(SampleMessages.CreateFullTestAllTypes().ToByteArray()); in SizeLimit()
916 return message.ToByteArray(); in GenerateBigSerializedMessage()
DCodedOutputStreamTest.cs261 byte[] rawBytes = message.ToByteArray(); in WriteWholeMessage_VaryingBlockSizes()
/third_party/protobuf/csharp/src/Google.Protobuf.Benchmarks/
DWriteMessagesBenchmark.cs65 return manyWrapperFieldsTest.ToByteArray(); in ManyWrapperFieldsMessage_ToByteArray()
84 return manyPrimitiveFieldsTest.ToByteArray(); in ManyPrimitiveFieldsMessage_ToByteArray()
102 return emptyMessageTest.ToByteArray(); in EmptyMessage_ToByteArray()
160 public byte[] ToByteArray() => message.ToByteArray(); in ToByteArray() method in Google.Protobuf.Benchmarks.WriteMessagesBenchmark.SubTest
DGoogleMessageBenchmark.cs82 public void ToByteArray() => subTests.ForEach(item => item.ToByteArray()); in ToByteArray() method in Google.Protobuf.Benchmarks.GoogleMessageBenchmark
113 public void ToByteArray() => message.ToByteArray(); in ToByteArray() method in Google.Protobuf.Benchmarks.GoogleMessageBenchmark.SubTest
DBenchmarkDatasetConfig.cs69 Payloads = new List<byte[]>(dataset.Payload.Select(p => p.ToByteArray())); in BenchmarkDatasetConfig()
DParseMessagesBenchmark.cs215 this.data = message.ToByteArray(); in SubTest()
/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/WellKnownTypes/
DWrappersTest.cs74 var bytes = message.ToByteArray(); in NonDefaultSingleValues()
104 var bytes = message.ToByteArray(); in NonNullDefaultIsPreservedThroughSerialization()
143 var bytes = message.ToByteArray(); in RepeatedWrappersSerializeDeserialize()
171 var actualBytes = message.ToByteArray(); in RepeatedWrappersBinaryFormat()
197 var bytes = message.ToByteArray(); in MapWrappersSerializeDeserialize()
291 var bytes = message.ToByteArray(); in AssertOneofRoundTrip()
316 originalMessage.MergeFrom(mergingMessage.ToByteArray()); in Merging()
357 var bytes = new TestWellKnownTypes { Int32Field = 0 }.ToByteArray(); in MergingStreamNoValue()
/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/
DGeneratedMessageTest.cs131 byte[] bytes = message.ToByteArray(); in RoundTrip_Empty()
166 byte[] bytes = message.ToByteArray(); in RoundTrip_SingleValues()
200 byte[] bytes = message.ToByteArray(); in RoundTrip_RepeatedValues()
232 byte[] bytes = message.ToByteArray(); in RoundTrip_Maps()
245 byte[] bytes = message.ToByteArray(); in MapWithEmptyEntry()
618 var bytes = message.ToByteArray(); in OneofSerialization_NonDefaultValue()
632 var bytes = message.ToByteArray(); in OneofSerialization_DefaultValue()
663 var data = SampleMessages.CreateFullTestAllTypes().ToByteArray(); in DiscardUnknownFields_AllTypes()
DByteStringTest.cs113 byte[] data = bs.ToByteArray(); in ToByteArrayCopiesContents()
161 Assert.AreEqual(data, bs.ToByteArray()); in FromBase64_WithText()
DCodedInputStreamTest.cs234 byte[] rawBytes = message.ToByteArray(); in ReadWholeMessage_VaryingBlockSizes()
323 … = CodedInputStream.CreateWithLimits(new MemoryStream(atRecursiveLimit.ToByteArray()), 1000000, Co… in MaliciousRecursion()
332 … MemoryStream ms = new MemoryStream(SampleMessages.CreateFullTestAllTypes().ToByteArray()); in SizeLimit()
DCodedOutputStreamTest.cs198 byte[] rawBytes = message.ToByteArray(); in WriteWholeMessage_VaryingBlockSizes()
/third_party/protobuf/csharp/src/Google.Protobuf/
DMessageExtensions.cs99 public static byte[] ToByteArray(this IMessage message) in ToByteArray() method in Google.Protobuf.MessageExtensions
146 return ByteString.AttachBytes(message.ToByteArray()); in ToByteString()
DByteString.cs147 public byte[] ToByteArray() in ToByteArray() method in Google.Protobuf.ByteString
/third_party/protobuf/csharp/src/AddressBook/
DSampleUsage.cs63 bytes = book.ToByteArray(); in Main()
/third_party/protobuf/csharp/src/Google.Protobuf.Test/WellKnownTypes/
DWrappersTest.cs176 var actualBytes = message.ToByteArray(); in RepeatedWrappersBinaryFormat()
323 originalMessage.MergeFrom(mergingMessage.ToByteArray()); in Merging()
364 var bytes = new TestWellKnownTypes { Int32Field = 0 }.ToByteArray(); in MergingStreamNoValue()
/third_party/protobuf/csharp/src/Google.Protobuf.Conformance/
DProgram.cs77 byte[] outputData = response.ToByteArray(); in RunTest()