Home | History | Annotate | Download | only in Google.Protobuf.Test

Lines Matching refs:new

49             byte[] bytes = new byte[bytesAsInts.Length];

62 CodedInputStream input = new CodedInputStream(data);
65 input = new CodedInputStream(data);
72 input = new CodedInputStream(new SmallBlockInputStream(data, bufferSize));
75 input = new CodedInputStream(new SmallBlockInputStream(data, bufferSize));
83 MemoryStream memoryStream = new MemoryStream();
98 CodedInputStream input = new CodedInputStream(data);
102 input = new CodedInputStream(data);
107 exception = Assert.Throws<InvalidProtocolBufferException>(() => CodedInputStream.ReadRawVarint32(new MemoryStream(data)));
155 CodedInputStream input = new CodedInputStream(data);
162 input = new CodedInputStream(
163 new SmallBlockInputStream(data, blockSize));
175 CodedInputStream input = new CodedInputStream(data);
182 input = new CodedInputStream(
183 new SmallBlockInputStream(data, blockSize));
242 message2 = TestAllTypes.Parser.ParseFrom(new SmallBlockInputStream(rawBytes, blockSize));
251 byte[] blob = new byte[1 << 20];
258 var message = new TestAllTypes { SingleBytes = ByteString.CopyFrom(blob) };
271 MemoryStream ms = new MemoryStream();
272 CodedOutputStream output = new CodedOutputStream(ms);
277 output.WriteRawBytes(new byte[32]); // Pad with a few random bytes.
281 CodedInputStream input = new CodedInputStream(ms);
291 return new TestRecursiveMessage { I = 5 };
295 return new TestRecursiveMessage { A = MakeRecursiveMessage(depth - 1) };
323 CodedInputStream input = CodedInputStream.CreateWithLimits(new MemoryStream(data64.ToByteArray()), 1000000, 63);
332 MemoryStream ms = new MemoryStream(SampleMessages.CreateFullTestAllTypes().ToByteArray());
345 MemoryStream ms = new MemoryStream();
346 CodedOutputStream output = new CodedOutputStream(ms);
351 output.WriteRawBytes(new byte[] {0x80});
355 CodedInputStream input = new CodedInputStream(ms);
387 CodedInputStream input = new CodedInputStream(bytes);
396 using (var ms = new MemoryStream())
398 CodedOutputStream output = new CodedOutputStream(ms);
400 output.WriteBytes(ByteString.CopyFrom(new byte[100]));
402 output.WriteBytes(ByteString.CopyFrom(new byte[100]));
406 CodedInputStream input = new CodedInputStream(ms, new byte[ms.Length / 2], 0, 0);
421 var input = new CodedInputStream(new byte[] { 0 });
436 var stream = new MemoryStream();
437 var output = new CodedOutputStream(stream);
463 var input = new CodedInputStream(stream);
480 var stream = new MemoryStream();
481 var output = new CodedOutputStream(stream);
494 var input = new CodedInputStream(stream);
507 var stream = new MemoryStream();
508 var output = new CodedOutputStream(stream);
513 var input = new CodedInputStream(stream);
521 var stream = new MemoryStream();
522 var output = new CodedOutputStream(stream);
531 var input = new CodedInputStream(stream);
539 var stream = new MemoryStream();
540 var output = new CodedOutputStream(stream);
553 var input = new CodedInputStream(stream);
561 Assert.Throws<ArgumentNullException>(() => new CodedInputStream((byte[]) null));
562 Assert.Throws<ArgumentNullException>(() => new CodedInputStream(null, 0, 0));
563 Assert.Throws<ArgumentNullException>(() => new CodedInputStream((Stream) null));
564 Assert.Throws<ArgumentOutOfRangeException>(() => new CodedInputStream(new byte[10], 100, 0));
565 Assert.Throws<ArgumentOutOfRangeException>(() => new CodedInputStream(new byte[10], 5, 10));
571 var stream = new MemoryStream();
579 var memoryStream = new MemoryStream();
581 using (var cis = new CodedInputStream(memoryStream))
590 var memoryStream = new MemoryStream();
592 using (var cis = new CodedInputStream(memoryStream, true))