Home
last modified time | relevance | path

Searched refs:FieldCodec (Results 1 - 25 of 30) sorted by relevance

12

/third_party/protobuf/csharp/src/Google.Protobuf/
H A DFieldCodec.cs43 /// Factory methods for <see cref="FieldCodec{T}"/>.
45 public static class FieldCodec class
54 public static FieldCodec<string> ForString(uint tag) in ForString()
56 return FieldCodec.ForString(tag, ""); in ForString()
64 public static FieldCodec<ByteString> ForBytes(uint tag) in ForBytes()
66 return FieldCodec.ForBytes(tag, ByteString.Empty); in ForBytes()
74 public static FieldCodec<bool> ForBool(uint tag) in ForBool()
76 return FieldCodec.ForBool(tag, false); in ForBool()
84 public static FieldCodec<int> ForInt32(uint tag) in ForInt32()
86 return FieldCodec in ForInt32()
[all...]
H A DExtension.cs70 private readonly FieldCodec<TValue> codec;
75 public Extension(int fieldNumber, FieldCodec<TValue> codec) : base(fieldNumber) in Extension()
100 private readonly FieldCodec<TValue> codec;
105 public RepeatedExtension(int fieldNumber, FieldCodec<TValue> codec) : base(fieldNumber) in RepeatedExtension()
H A DExtensionValue.cs52 private FieldCodec<T> codec;
54 internal ExtensionValue(FieldCodec<T> codec) in ExtensionValue()
142 private readonly FieldCodec<T> codec;
144 internal RepeatedExtensionValue(FieldCodec<T> codec) in RepeatedExtensionValue()
/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/
H A DFieldCodecTest.cs46 new FieldCodecTestData<bool>(FieldCodec.ForBool(100), true, "FixedBool"),
47 new FieldCodecTestData<string>(FieldCodec.ForString(100), "sample", "String"),
48 new FieldCodecTestData<ByteString>(FieldCodec.ForBytes(100), ByteString.CopyFrom(1, 2, 3), "Bytes"),
49 new FieldCodecTestData<int>(FieldCodec.ForInt32(100), -1000, "Int32"),
50 new FieldCodecTestData<int>(FieldCodec.ForSInt32(100), -1000, "SInt32"),
51 new FieldCodecTestData<int>(FieldCodec.ForSFixed32(100), -1000, "SFixed32"),
52 new FieldCodecTestData<uint>(FieldCodec.ForUInt32(100), 1234, "UInt32"),
53 new FieldCodecTestData<uint>(FieldCodec.ForFixed32(100), 1234, "Fixed32"),
54 new FieldCodecTestData<long>(FieldCodec.ForInt64(100), -1000, "Int64"),
55 new FieldCodecTestData<long>(FieldCodec
[all...]
/third_party/protobuf/csharp/src/Google.Protobuf.Test/
H A DFieldCodecTest.cs46 new FieldCodecTestData<bool>(FieldCodec.ForBool(100), true, "FixedBool"),
47 new FieldCodecTestData<string>(FieldCodec.ForString(100), "sample", "String"),
48 new FieldCodecTestData<ByteString>(FieldCodec.ForBytes(100), ByteString.CopyFrom(1, 2, 3), "Bytes"),
49 new FieldCodecTestData<int>(FieldCodec.ForInt32(100), -1000, "Int32"),
50 new FieldCodecTestData<int>(FieldCodec.ForSInt32(100), -1000, "SInt32"),
51 new FieldCodecTestData<int>(FieldCodec.ForSFixed32(100), -1000, "SFixed32"),
52 new FieldCodecTestData<uint>(FieldCodec.ForUInt32(100), 1234, "UInt32"),
53 new FieldCodecTestData<uint>(FieldCodec.ForFixed32(100), 1234, "Fixed32"),
54 new FieldCodecTestData<long>(FieldCodec.ForInt64(100), -1000, "Int64"),
55 new FieldCodecTestData<long>(FieldCodec
[all...]
/third_party/protobuf/csharp/src/Google.Protobuf.Test.TestProtos/
H A DTestMessagesProto3.cs727 private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec
728 = pb::FieldCodec.ForInt32(250);
740 private static readonly pb::FieldCodec<long> _repeated_repeatedInt64_codec
741 = pb::FieldCodec.ForInt64(258);
750 private static readonly pb::FieldCodec<uint> _repeated_repeatedUint32_codec
751 = pb::FieldCodec.ForUInt32(266);
760 private static readonly pb::FieldCodec<ulong> _repeated_repeatedUint64_codec
761 = pb::FieldCodec.ForUInt64(274);
770 private static readonly pb::FieldCodec<int> _repeated_repeatedSint32_codec
771 = pb::FieldCodec
[all...]
H A DUnittestWellKnownTypes.cs339 private static readonly pb::FieldCodec<double?> _single_doubleField_codec = pb::FieldCodec.ForStructWrapper<double>(82);
352 private static readonly pb::FieldCodec<float?> _single_floatField_codec = pb::FieldCodec.ForStructWrapper<float>(90);
365 private static readonly pb::FieldCodec<long?> _single_int64Field_codec = pb::FieldCodec.ForStructWrapper<long>(98);
378 private static readonly pb::FieldCodec<ulong?> _single_uint64Field_codec = pb::FieldCodec.ForStructWrapper<ulong>(106);
391 private static readonly pb::FieldCodec<int?> _single_int32Field_codec = pb::FieldCodec
[all...]
H A DMapUnittestProto3.cs236 = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForInt32(8, 0), pb::FieldCodec.ForInt32(16, 0), 10);
246 = new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForInt64(8, 0L), pb::FieldCodec.ForInt64(16, 0L), 18);
256 = new pbc::MapField<uint, uint>.Codec(pb::FieldCodec.ForUInt32(8, 0), pb::FieldCodec.ForUInt32(16, 0), 26);
266 = new pbc::MapField<ulong, ulong>.Codec(pb::FieldCodec.ForUInt64(8, 0UL), pb::FieldCodec.ForUInt64(16, 0UL), 34);
276 = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForSInt32(8, 0), pb::FieldCodec
[all...]
H A DTestMessagesProto2.cs225 new pb::Extension<global::ProtobufTestMessages.Proto2.TestAllTypesProto2, int>(120, pb::FieldCodec.ForInt32(960, 0));
920 private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec
921 = pb::FieldCodec.ForInt32(248);
933 private static readonly pb::FieldCodec<long> _repeated_repeatedInt64_codec
934 = pb::FieldCodec.ForInt64(256);
943 private static readonly pb::FieldCodec<uint> _repeated_repeatedUint32_codec
944 = pb::FieldCodec.ForUInt32(264);
953 private static readonly pb::FieldCodec<ulong> _repeated_repeatedUint64_codec
954 = pb::FieldCodec.ForUInt64(272);
963 private static readonly pb::FieldCodec<in
[all...]
H A DUnittestProto3.cs603 private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec
604 = pb::FieldCodec.ForInt32(250);
616 private static readonly pb::FieldCodec<long> _repeated_repeatedInt64_codec
617 = pb::FieldCodec.ForInt64(258);
626 private static readonly pb::FieldCodec<uint> _repeated_repeatedUint32_codec
627 = pb::FieldCodec.ForUInt32(266);
636 private static readonly pb::FieldCodec<ulong> _repeated_repeatedUint64_codec
637 = pb::FieldCodec.ForUInt64(274);
646 private static readonly pb::FieldCodec<int> _repeated_repeatedSint32_codec
647 = pb::FieldCodec
[all...]
H A DUnittestCustomOptionsProto3.cs170 new pb::Extension<global::Google.Protobuf.Reflection.FileOptions, ulong>(7736974, pb::FieldCodec.ForUInt64(61895792, 0UL));
172 new pb::Extension<global::Google.Protobuf.Reflection.MessageOptions, int>(7739036, pb::FieldCodec.ForInt32(61912288, 0));
174 new pb::Extension<global::Google.Protobuf.Reflection.FieldOptions, ulong>(7740936, pb::FieldCodec.ForFixed64(61927489, 0UL));
176 new pb::Extension<global::Google.Protobuf.Reflection.OneofOptions, int>(7740111, pb::FieldCodec.ForInt32(61920888, 0));
178 new pb::Extension<global::Google.Protobuf.Reflection.EnumOptions, int>(7753576, pb::FieldCodec.ForSFixed32(62028613, 0));
180 new pb::Extension<global::Google.Protobuf.Reflection.EnumValueOptions, int>(1560678, pb::FieldCodec.ForInt32(12485424, 0));
182 new pb::Extension<global::Google.Protobuf.Reflection.ServiceOptions, long>(7887650, pb::FieldCodec.ForSInt64(63101200, 0L));
184 new pb::Extension<global::Google.Protobuf.Reflection.MethodOptions, global::UnitTest.Issues.TestProtos.MethodOpt1>(7890860, pb::FieldCodec.ForEnum(63126880, x => (int) x, x => (global::UnitTest.Issues.TestProtos.MethodOpt1) x, global::UnitTest.Issues.TestProtos.MethodOpt1.Unspecified));
186 new pb::Extension<global::Google.Protobuf.Reflection.MessageOptions, bool>(7706090, pb::FieldCodec.ForBool(61648720, false));
188 new pb::Extension<global::Google.Protobuf.Reflection.MessageOptions, int>(7705709, pb::FieldCodec
[all...]
H A DUnittest.cs757 new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, int>(1, pb::FieldCodec.ForInt32(8, 0));
759 new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, long>(2, pb::FieldCodec.ForInt64(16, 0L));
761 new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, uint>(3, pb::FieldCodec.ForUInt32(24, 0));
763 new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, ulong>(4, pb::FieldCodec.ForUInt64(32, 0UL));
765 new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, int>(5, pb::FieldCodec.ForSInt32(40, 0));
767 new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, long>(6, pb::FieldCodec.ForSInt64(48, 0L));
769 new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, uint>(7, pb::FieldCodec.ForFixed32(61, 0));
771 new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, ulong>(8, pb::FieldCodec.ForFixed64(65, 0UL));
773 new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, int>(9, pb::FieldCodec.ForSFixed32(77, 0));
775 new pb::Extension<global::Google.Protobuf.TestProtos.Proto2.TestAllExtensions, long>(10, pb::FieldCodec
[all...]
H A DUnittestSelfreferentialOptions.cs56 new pb::Extension<global::Google.Protobuf.Reflection.FieldOptions, int>(1000, pb::FieldCodec.ForInt32(8000, 0));
58 new pb::Extension<global::Google.Protobuf.Reflection.FieldOptions, global::UnitTest.Issues.TestProtos.SelfreferentialOptions.FooOptions>(1001, pb::FieldCodec.ForMessage(8010, global::UnitTest.Issues.TestProtos.SelfreferentialOptions.FooOptions.Parser));
60 new pb::Extension<global::UnitTest.Issues.TestProtos.SelfreferentialOptions.FooOptions, int>(1000, pb::FieldCodec.ForInt32(8000, 0));
62 new pb::Extension<global::UnitTest.Issues.TestProtos.SelfreferentialOptions.FooOptions, global::UnitTest.Issues.TestProtos.SelfreferentialOptions.FooOptions>(1001, pb::FieldCodec.ForMessage(8010, global::UnitTest.Issues.TestProtos.SelfreferentialOptions.FooOptions.Parser));
H A DUnittestIssue6936A.cs41 new pb::Extension<global::Google.Protobuf.Reflection.MessageOptions, string>(50000, pb::FieldCodec.ForString(400002, ""));
/third_party/protobuf/csharp/src/Google.Protobuf.Benchmarks/
H A DWrapperBenchmarkMessages.cs390 private static readonly pb::FieldCodec<double?> _single_doubleField95_codec = pb::FieldCodec.ForStructWrapper<double>(762);
403 private static readonly pb::FieldCodec<double?> _single_doubleField1_codec = pb::FieldCodec.ForStructWrapper<double>(10);
416 private static readonly pb::FieldCodec<double?> _single_doubleField79_codec = pb::FieldCodec.ForStructWrapper<double>(634);
429 private static readonly pb::FieldCodec<long?> _single_int64Field2_codec = pb::FieldCodec.ForStructWrapper<long>(18);
442 private static readonly pb::FieldCodec<double?> _single_doubleField96_codec = pb::FieldCodec
[all...]
H A DBenchmarks.cs118 private static readonly pb::FieldCodec<pb::ByteString> _repeated_payload_codec
119 = pb::FieldCodec.ForBytes(26);
/third_party/protobuf/csharp/src/Google.Protobuf.Test/Collections/
H A DRepeatedFieldTest.cs330 field.AddEntriesFrom(input, FieldCodec.ForInt32(nonPackedTag)); in AddEntriesFrom_PackedInt32()
356 field.AddEntriesFrom(input, FieldCodec.ForInt32(packedTag)); in AddEntriesFrom_NonPackedInt32()
379 field.AddEntriesFrom(input, FieldCodec.ForString(tag)); in AddEntriesFrom_String()
403 field.AddEntriesFrom(input, FieldCodec.ForMessage(tag, ForeignMessage.Parser)); in AddEntriesFrom_Message()
415 field.WriteTo(output, FieldCodec.ForInt32(tag)); in WriteTo_PackedInt32()
436 field.WriteTo(output, FieldCodec.ForInt32(tag)); in WriteTo_NonPackedInt32()
457 field.WriteTo(output, FieldCodec.ForString(tag)); in WriteTo_String()
480 field.WriteTo(output, FieldCodec.ForMessage(tag, ForeignMessage.Parser)); in WriteTo_Message()
498 Assert.AreEqual(7, list.CalculateSize(FieldCodec.ForInt32(tag))); in CalculateSize_VariableSizeNonPacked()
507 Assert.AreEqual(15, list.CalculateSize(FieldCodec in CalculateSize_FixedSizeNonPacked()
[all...]
/third_party/protobuf/csharp/compatibility_tests/v3.0.0/src/Google.Protobuf.Test/Collections/
H A DRepeatedFieldTest.cs329 field.AddEntriesFrom(input, FieldCodec.ForInt32(nonPackedTag)); in AddEntriesFrom_PackedInt32()
355 field.AddEntriesFrom(input, FieldCodec.ForInt32(packedTag)); in AddEntriesFrom_NonPackedInt32()
378 field.AddEntriesFrom(input, FieldCodec.ForString(tag)); in AddEntriesFrom_String()
402 field.AddEntriesFrom(input, FieldCodec.ForMessage(tag, ForeignMessage.Parser)); in AddEntriesFrom_Message()
414 field.WriteTo(output, FieldCodec.ForInt32(tag)); in WriteTo_PackedInt32()
435 field.WriteTo(output, FieldCodec.ForInt32(tag)); in WriteTo_NonPackedInt32()
456 field.WriteTo(output, FieldCodec.ForString(tag)); in WriteTo_String()
479 field.WriteTo(output, FieldCodec.ForMessage(tag, ForeignMessage.Parser)); in WriteTo_Message()
497 Assert.AreEqual(7, list.CalculateSize(FieldCodec.ForInt32(tag))); in CalculateSize_VariableSizeNonPacked()
506 Assert.AreEqual(15, list.CalculateSize(FieldCodec in CalculateSize_FixedSizeNonPacked()
[all...]
/third_party/protobuf/csharp/src/Google.Protobuf/Collections/
H A DRepeatedField.cs98 public void AddEntriesFrom(CodedInputStream input, FieldCodec<T> codec) in AddEntriesFrom()
117 public void AddEntriesFrom(ref ParseContext ctx, FieldCodec<T> codec) in AddEntriesFrom()
124 if (FieldCodec<T>.IsPackedRepeatedField(tag)) in AddEntriesFrom()
176 public int CalculateSize(FieldCodec<T> codec) in CalculateSize()
206 private int CalculatePackedDataSize(FieldCodec<T> codec) in CalculatePackedDataSize()
231 public void WriteTo(CodedOutputStream output, FieldCodec<T> codec) in WriteTo()
251 public void WriteTo(ref WriteContext ctx, FieldCodec<T> codec) in WriteTo()
H A DMapField.cs639 private readonly FieldCodec<TKey> keyCodec;
640 private readonly FieldCodec<TValue> valueCodec;
650 public Codec(FieldCodec<TKey> keyCodec, FieldCodec<TValue> valueCodec, uint mapTag) in Codec()
/third_party/protobuf/csharp/src/Google.Protobuf/Reflection/
H A DDescriptor.cs237 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.FileDescriptorProto> _repeated_file_codec
238 = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Reflection.FileDescriptorProto.Parser);
464 private static readonly pb::FieldCodec<string> _repeated_dependency_codec
465 = pb::FieldCodec.ForString(26);
477 private static readonly pb::FieldCodec<int> _repeated_publicDependency_codec
478 = pb::FieldCodec.ForInt32(80);
490 private static readonly pb::FieldCodec<int> _repeated_weakDependency_codec
491 = pb::FieldCodec.ForInt32(88);
504 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.DescriptorProto> _repeated_messageType_codec
505 = pb::FieldCodec
[all...]
/third_party/protobuf/csharp/src/Google.Protobuf/WellKnownTypes/
H A DApi.cs128 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Method> _repeated_methods_codec
129 = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Method.Parser);
141 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec
142 = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Option.Parser);
201 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Mixin> _repeated_mixins_codec
202 = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.WellKnownTypes.Mixin.Parser);
591 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec
592 = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.WellKnownTypes.Option.Parser);
H A DType.cs156 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Field> _repeated_fields_codec
157 = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Field.Parser);
169 private static readonly pb::FieldCodec<string> _repeated_oneofs_codec
170 = pb::FieldCodec.ForString(26);
182 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec
183 = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.WellKnownTypes.Option.Parser);
595 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_options_codec
596 = pb::FieldCodec.ForMessage(74, global::Google.Protobuf.WellKnownTypes.Option.Parser);
1135 private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.EnumValue> _repeated_enumvalue_codec
1136 = pb::FieldCodec
[all...]
H A DFieldMask.cs283 private static readonly pb::FieldCodec<string> _repeated_paths_codec
284 = pb::FieldCodec.ForString(10);
/third_party/protobuf/csharp/src/AddressBook/
H A DAddressbook.cs132 private static readonly pb::FieldCodec<global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneNumber> _repeated_phones_codec
133 = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneNumber.Parser);
633 private static readonly pb::FieldCodec<global::Google.Protobuf.Examples.AddressBook.Person> _repeated_people_codec
634 = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Examples.AddressBook.Person.Parser);

Completed in 89 milliseconds

12