Home
last modified time | relevance | path

Searched refs:ParseFrom (Results 1 – 25 of 36) sorted by relevance

12

/third_party/protobuf/csharp/src/Google.Protobuf.Test/
DMessageParsingHelpers.cs44 var parsedStream = parser.ParseFrom(bytes);
47 var parsedBuffer = parser.ParseFrom(new ReadOnlySequence<byte>(bytes));
51 parsedBuffer = parser.ParseFrom(ReadOnlySequenceFactory.CreateWithContent(bytes));
59 var parsedStream = parser.ParseFrom(bytes); in AssertReadingMessage()
62 var parsedBuffer = parser.ParseFrom(new ReadOnlySequence<byte>(bytes)); in AssertReadingMessage()
66 parsedBuffer = parser.ParseFrom(ReadOnlySequenceFactory.CreateWithContent(bytes)); in AssertReadingMessage()
76 Assert.Throws<TException>(() => parser.ParseFrom(bytes));
78 Assert.Throws<TException>(() => parser.ParseFrom(new ReadOnlySequence<byte>(bytes)));
91 var parsedBuffer = parser.ParseFrom(new ReadOnlySequence<byte>(bytes));
96 parsedBuffer = parser.ParseFrom(ReadOnlySequenceFactory.CreateWithContent(bytes));
[all …]
DUnknownFieldSetTest.cs84 var newMessage = message.Descriptor.Parser.ParseFrom(emptyMessage.ToByteArray()); in TestMergeCodedInput()
170 assertFull(retainingParser1.ParseFrom(data, 0, data.Length)); in TestDiscardUnknownFields()
171 assertFull(retainingParser2.ParseFrom(data, 0, data.Length)); in TestDiscardUnknownFields()
172 assertEmpty(discardingParser1.ParseFrom(data, 0, data.Length)); in TestDiscardUnknownFields()
173 assertEmpty(discardingParser2.ParseFrom(data, 0, data.Length)); in TestDiscardUnknownFields()
176 assertFull(retainingParser1.ParseFrom(new CodedInputStream(data))); in TestDiscardUnknownFields()
177 assertFull(retainingParser2.ParseFrom(new CodedInputStream(data))); in TestDiscardUnknownFields()
178 assertEmpty(discardingParser1.ParseFrom(new CodedInputStream(data))); in TestDiscardUnknownFields()
179 assertEmpty(discardingParser2.ParseFrom(new CodedInputStream(data))); in TestDiscardUnknownFields()
182 assertFull(retainingParser1.ParseFrom(new MemoryStream(data))); in TestDiscardUnknownFields()
[all …]
DCodedInputStreamTest.cs317 TestAllTypes message2 = TestAllTypes.Parser.ParseFrom(rawBytes); in ReadWholeMessage_VaryingBlockSizes()
323 … message2 = TestAllTypes.Parser.ParseFrom(new SmallBlockInputStream(rawBytes, blockSize)); in ReadWholeMessage_VaryingBlockSizes()
335 TestAllTypes message2 = TestAllTypes.Parser.ParseFrom(rawBytes); in ReadWholeMessage_VaryingBlockSizes_FromSequence()
341 …message2 = TestAllTypes.Parser.ParseFrom(ReadOnlySequenceFactory.CreateWithContent(rawBytes, block… in ReadWholeMessage_VaryingBlockSizes_FromSequence()
362 TestAllTypes message2 = TestAllTypes.Parser.ParseFrom(message.ToByteString()); in ReadHugeBlob()
496 …AssertMessageDepth(TestRecursiveMessage.Parser.ParseFrom(atRecursiveLimit), CodedInputStream.Defau… in MaliciousRecursion()
498 …hrows<InvalidProtocolBufferException>(() => TestRecursiveMessage.Parser.ParseFrom(beyondRecursiveL… in MaliciousRecursion()
501 … Assert.Throws<InvalidProtocolBufferException>(() => TestRecursiveMessage.Parser.ParseFrom(input)); in MaliciousRecursion()
528 … Assert.DoesNotThrow(() => TestRecursiveMessage.Parser.ParseFrom(payloadAtRecursiveLimit)); in MaliciousRecursion_UnknownFields()
529 …hrows<InvalidProtocolBufferException>(() => TestRecursiveMessage.Parser.ParseFrom(payloadBeyondRec… in MaliciousRecursion_UnknownFields()
[all …]
DTestCornerCases.cs58 NegativeEnumMessage copy = NegativeEnumMessage.Parser.ParseFrom(bytes); in TestRoundTripNegativeEnums()
/third_party/skia/third_party/externals/abseil-cpp/absl/flags/
Dcommandlineflag_test.cc125 EXPECT_TRUE(flags::PrivateHandleAccessor::ParseFrom( in TEST_F()
131 EXPECT_TRUE(flags::PrivateHandleAccessor::ParseFrom( in TEST_F()
138 EXPECT_TRUE(!flags::PrivateHandleAccessor::ParseFrom( in TEST_F()
146 EXPECT_TRUE(!flags::PrivateHandleAccessor::ParseFrom( in TEST_F()
153 EXPECT_TRUE(flags::PrivateHandleAccessor::ParseFrom( in TEST_F()
160 EXPECT_TRUE(flags::PrivateHandleAccessor::ParseFrom( in TEST_F()
165 EXPECT_TRUE(!flags::PrivateHandleAccessor::ParseFrom( in TEST_F()
170 EXPECT_TRUE(flags::PrivateHandleAccessor::ParseFrom( in TEST_F()
175 EXPECT_TRUE(flags::PrivateHandleAccessor::ParseFrom( in TEST_F()
187 EXPECT_TRUE(flags::PrivateHandleAccessor::ParseFrom( in TEST_F()
[all …]
Dreflection_test.cc182 absl::FindCommandLineFlag("test_flag_01")->ParseFrom("false", &error)) in TEST_F()
185 absl::FindCommandLineFlag("test_flag_02")->ParseFrom("-4536", &error)) in TEST_F()
188 absl::FindCommandLineFlag("test_flag_03")->ParseFrom("111", &error)) in TEST_F()
191 absl::FindCommandLineFlag("test_flag_04")->ParseFrom("909", &error)) in TEST_F()
194 absl::FindCommandLineFlag("test_flag_05")->ParseFrom("-2004", &error)) in TEST_F()
197 absl::FindCommandLineFlag("test_flag_06")->ParseFrom("1000023", &error)) in TEST_F()
200 absl::FindCommandLineFlag("test_flag_07")->ParseFrom("69305", &error)) in TEST_F()
203 ->ParseFrom("1000000001", &error)) in TEST_F()
206 absl::FindCommandLineFlag("test_flag_09")->ParseFrom("2.09021", &error)) in TEST_F()
209 absl::FindCommandLineFlag("test_flag_10")->ParseFrom("-33.1", &error)) in TEST_F()
[all …]
Dcommandlineflag.cc28 bool CommandLineFlag::ParseFrom(absl::string_view value, std::string* error) { in ParseFrom() function in absl::CommandLineFlag
29 return ParseFrom(value, flags_internal::SET_FLAGS_VALUE, in ParseFrom()
Dcommandlineflag.h153 bool ParseFrom(absl::string_view value, std::string* error);
169 virtual bool ParseFrom(absl::string_view value,
/third_party/protobuf/csharp/src/Google.Protobuf/
DMessageParser.cs73 public IMessage ParseFrom(byte[] data) in ParseFrom() method in Google.Protobuf.MessageParser
87 public IMessage ParseFrom(byte[] data, int offset, int length) in ParseFrom() method in Google.Protobuf.MessageParser
99 public IMessage ParseFrom(ByteString data) in ParseFrom() method in Google.Protobuf.MessageParser
111 public IMessage ParseFrom(Stream input) in ParseFrom() method in Google.Protobuf.MessageParser
124 public IMessage ParseFrom(ReadOnlySequence<byte> data) in ParseFrom() method in Google.Protobuf.MessageParser
152 public IMessage ParseFrom(CodedInputStream input) in ParseFrom() method in Google.Protobuf.MessageParser
260 public new T ParseFrom(byte[] data) in ParseFrom() method in Google.Protobuf.MessageParser
274 public new T ParseFrom(byte[] data, int offset, int length) in ParseFrom() method in Google.Protobuf.MessageParser
286 public new T ParseFrom(ByteString data) in ParseFrom() method in Google.Protobuf.MessageParser
298 public new T ParseFrom(Stream input) in ParseFrom() method in Google.Protobuf.MessageParser
[all …]
/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/
DGeneratedMessageTest.cs133 TestAllTypes parsed = TestAllTypes.Parser.ParseFrom(bytes); in RoundTrip_Empty()
167 TestAllTypes parsed = TestAllTypes.Parser.ParseFrom(bytes); in RoundTrip_SingleValues()
201 TestAllTypes parsed = TestAllTypes.Parser.ParseFrom(bytes); in RoundTrip_RepeatedValues()
233 TestMap parsed = TestMap.Parser.ParseFrom(bytes); in RoundTrip_Maps()
248 var parsed = TestMap.Parser.ParseFrom(bytes); in MapWithEmptyEntry()
267 var parsed = TestMap.Parser.ParseFrom(memoryStream.ToArray()); in MapWithOnlyValue()
284 var parsed = TestMap.Parser.ParseFrom(memoryStream.ToArray()); in MapWithOnlyKey_PrimitiveValue()
301 var parsed = TestMap.Parser.ParseFrom(memoryStream.ToArray()); in MapWithOnlyKey_MessageValue()
329 var parsed = TestMap.Parser.ParseFrom(memoryStream.ToArray()); in MapIgnoresExtraFieldsWithinEntryMessages()
353 var parsed = TestMap.Parser.ParseFrom(memoryStream.ToArray()); in MapFieldOrderIsIrrelevant()
[all …]
DCodedInputStreamTest.cs236 TestAllTypes message2 = TestAllTypes.Parser.ParseFrom(rawBytes); in ReadWholeMessage_VaryingBlockSizes()
242 … message2 = TestAllTypes.Parser.ParseFrom(new SmallBlockInputStream(rawBytes, blockSize)); in ReadWholeMessage_VaryingBlockSizes()
263 TestAllTypes message2 = TestAllTypes.Parser.ParseFrom(message.ToByteString()); in ReadHugeBlob()
319 …AssertMessageDepth(TestRecursiveMessage.Parser.ParseFrom(atRecursiveLimit), CodedInputStream.Defau… in MaliciousRecursion()
321 …hrows<InvalidProtocolBufferException>(() => TestRecursiveMessage.Parser.ParseFrom(beyondRecursiveL… in MaliciousRecursion()
324 … Assert.Throws<InvalidProtocolBufferException>(() => TestRecursiveMessage.Parser.ParseFrom(input)); in MaliciousRecursion()
334 … Assert.Throws<InvalidProtocolBufferException>(() => TestAllTypes.Parser.ParseFrom(input)); in SizeLimit()
DTestCornerCases.cs58 NegativeEnumMessage copy = NegativeEnumMessage.Parser.ParseFrom(bytes); in TestRoundTripNegativeEnums()
/third_party/protobuf/src/google/protobuf/
Dmessage_lite.cc268 return ParseFrom<kParse>(input); in ParseFromZeroCopyStream()
273 return ParseFrom<kParsePartial>(input); in ParsePartialFromZeroCopyStream()
298 return ParseFrom<kMergePartial>(internal::BoundedZCIS{input, size}); in MergePartialFromBoundedZeroCopyStream()
303 return ParseFrom<kMerge>(internal::BoundedZCIS{input, size}); in MergeFromBoundedZeroCopyStream()
308 return ParseFrom<kParse>(internal::BoundedZCIS{input, size}); in ParseFromBoundedZeroCopyStream()
313 return ParseFrom<kParsePartial>(internal::BoundedZCIS{input, size}); in ParsePartialFromBoundedZeroCopyStream()
317 return ParseFrom<kParse>(data); in ParseFromString()
321 return ParseFrom<kParsePartial>(data); in ParsePartialFromString()
325 return ParseFrom<kParse>(as_string_view(data, size)); in ParseFromArray()
329 return ParseFrom<kParsePartial>(as_string_view(data, size)); in ParsePartialFromArray()
[all …]
Dmessage_lite.h482 bool ParseFrom(const T& input);
558 bool MessageLite::ParseFrom(const T& input) { in ParseFrom() function
/third_party/protobuf/csharp/src/Google.Protobuf.Benchmarks/
DGoogleMessageBenchmark.cs75 subTests = Dataset.Payloads.Select(p => new SubTest(p, parser.ParseFrom(p))).ToList(); in GlobalSetup()
115 public void ParseFromByteArray(MessageParser parser) => parser.ParseFrom(data);
120 parser.ParseFrom(sourceStream); in ParseFromStream()
DParseMessagesBenchmark.cs221 public IMessage ParseFromByteArray() => parser.ParseFrom(data); in ParseFromByteArray()
223 public IMessage ParseFromReadOnlySequence() => parser.ParseFrom(dataSequence); in ParseFromReadOnlySequence()
DBenchmarkDatasetConfig.cs62 var dataset = BenchmarkDataset.Parser.ParseFrom(data); in BenchmarkDatasetConfig()
/third_party/skia/third_party/externals/abseil-cpp/absl/flags/internal/
Dprivate_handle_accessor.cc54 bool PrivateHandleAccessor::ParseFrom(CommandLineFlag& flag, in ParseFrom() function in absl::flags_internal::PrivateHandleAccessor
59 return flag.ParseFrom(value, set_mode, source, error); in ParseFrom()
Dprivate_handle_accessor.h52 static bool ParseFrom(CommandLineFlag& flag, absl::string_view value,
/third_party/protobuf/csharp/src/AddressBook/
DSampleUsage.cs57 Person copy = Person.Parser.ParseFrom(bytes); in Main()
65 AddressBook restored = AddressBook.Parser.ParseFrom(bytes); in Main()
DListPeople.cs93 AddressBook addressBook = AddressBook.Parser.ParseFrom(stream); in Main()
DAddPerson.cs112 addressBook = AddressBook.Parser.ParseFrom(file); in Main()
/third_party/protobuf/csharp/src/Google.Protobuf.Conformance/
DProgram.cs75 ConformanceRequest request = ConformanceRequest.Parser.ParseFrom(inputData); in RunTest()
119 …message = ProtobufTestMessages.Proto3.TestAllTypesProto3.Parser.ParseFrom(request.ProtobufPayload); in PerformRequest()
124 .ParseFrom(request.ProtobufPayload); in PerformRequest()
/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/WellKnownTypes/
DWrappersTest.cs75 var parsed = TestWellKnownTypes.Parser.ParseFrom(bytes); in NonDefaultSingleValues()
105 var parsed = TestWellKnownTypes.Parser.ParseFrom(bytes); in NonNullDefaultIsPreservedThroughSerialization()
144 var parsed = RepeatedWellKnownTypes.Parser.ParseFrom(bytes); in RepeatedWrappersSerializeDeserialize()
198 var parsed = MapWellKnownTypes.Parser.ParseFrom(bytes); in MapWrappersSerializeDeserialize()
292 var parsed = OneofWellKnownTypes.Parser.ParseFrom(bytes); in AssertOneofRoundTrip()
407 var message = TestWellKnownTypes.Parser.ParseFrom(stream); in UnknownFieldInWrapper()
/third_party/protobuf/docs/csharp/
Dproto2.md121 var foo = Foo.Factory.WithExtensionRegistry(registry).ParseFrom(input);
123 var fooNoRegistry = Foo.Factory.ParseFrom(input);
176 var baz = Foo.Descriptor.Parser.WithExtensionRegistry(registry).ParseFrom(input);

12