Home
last modified time | relevance | path

Searched refs:FieldCodec (Results 1 – 18 of 18) sorted by relevance

/external/protobuf/csharp/src/Google.Protobuf/
DFieldCodec.cs43 public static class FieldCodec class
52 public static FieldCodec<string> ForString(uint tag) in ForString()
54 …return new FieldCodec<string>(input => input.ReadString(), (output, value) => output.WriteString(v… in ForString()
62 public static FieldCodec<ByteString> ForBytes(uint tag) in ForBytes()
64 …return new FieldCodec<ByteString>(input => input.ReadBytes(), (output, value) => output.WriteBytes… in ForBytes()
72 public static FieldCodec<bool> ForBool(uint tag) in ForBool()
74 …return new FieldCodec<bool>(input => input.ReadBool(), (output, value) => output.WriteBool(value),… in ForBool()
82 public static FieldCodec<int> ForInt32(uint tag) in ForInt32()
84 …return new FieldCodec<int>(input => input.ReadInt32(), (output, value) => output.WriteInt32(value)… in ForInt32()
92 public static FieldCodec<int> ForSInt32(uint tag) in ForSInt32()
[all …]
/external/protobuf/csharp/src/Google.Protobuf.Test/
DFieldCodecTest.cs45 new FieldCodecTestData<bool>(FieldCodec.ForBool(100), true, "Bool"),
46 new FieldCodecTestData<string>(FieldCodec.ForString(100), "sample", "String"),
47 …new FieldCodecTestData<ByteString>(FieldCodec.ForBytes(100), ByteString.CopyFrom(1, 2, 3), "Bytes"…
48 new FieldCodecTestData<int>(FieldCodec.ForInt32(100), -1000, "Int32"),
49 new FieldCodecTestData<int>(FieldCodec.ForSInt32(100), -1000, "SInt32"),
50 new FieldCodecTestData<int>(FieldCodec.ForSFixed32(100), -1000, "SFixed32"),
51 new FieldCodecTestData<uint>(FieldCodec.ForUInt32(100), 1234, "UInt32"),
52 new FieldCodecTestData<uint>(FieldCodec.ForFixed32(100), 1234, "Fixed32"),
53 new FieldCodecTestData<long>(FieldCodec.ForInt64(100), -1000, "Int64"),
54 new FieldCodecTestData<long>(FieldCodec.ForSInt64(100), -1000, "SInt64"),
[all …]
/external/protobuf/csharp/src/Google.Protobuf.Test/TestProtos/
DMapUnittestProto3.cs224 … = new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForInt32(16), 10);
233 …= new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForInt64(8), pb::FieldCodec.ForInt64(16), 18);
242 …= new pbc::MapField<uint, uint>.Codec(pb::FieldCodec.ForUInt32(8), pb::FieldCodec.ForUInt32(16), 2…
251 …= new pbc::MapField<ulong, ulong>.Codec(pb::FieldCodec.ForUInt64(8), pb::FieldCodec.ForUInt64(16),…
260 …= new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForSInt32(8), pb::FieldCodec.ForSInt32(16), 42);
269 …= new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForSInt64(8), pb::FieldCodec.ForSInt64(16), 5…
278 …= new pbc::MapField<uint, uint>.Codec(pb::FieldCodec.ForFixed32(13), pb::FieldCodec.ForFixed32(21)…
287 …= new pbc::MapField<ulong, ulong>.Codec(pb::FieldCodec.ForFixed64(9), pb::FieldCodec.ForFixed64(17…
296 …= new pbc::MapField<int, int>.Codec(pb::FieldCodec.ForSFixed32(13), pb::FieldCodec.ForSFixed32(21)…
305 …= new pbc::MapField<long, long>.Codec(pb::FieldCodec.ForSFixed64(9), pb::FieldCodec.ForSFixed64(17…
[all …]
DUnittestWellKnownTypes.cs318 …private static readonly pb::FieldCodec<double?> _single_doubleField_codec = pb::FieldCodec.ForStru…
329 …private static readonly pb::FieldCodec<float?> _single_floatField_codec = pb::FieldCodec.ForStruct…
340 …private static readonly pb::FieldCodec<long?> _single_int64Field_codec = pb::FieldCodec.ForStructW…
351 …private static readonly pb::FieldCodec<ulong?> _single_uint64Field_codec = pb::FieldCodec.ForStruc…
362 …private static readonly pb::FieldCodec<int?> _single_int32Field_codec = pb::FieldCodec.ForStructWr…
373 …private static readonly pb::FieldCodec<uint?> _single_uint32Field_codec = pb::FieldCodec.ForStruct…
384 …private static readonly pb::FieldCodec<bool?> _single_boolField_codec = pb::FieldCodec.ForStructWr…
395 …private static readonly pb::FieldCodec<string> _single_stringField_codec = pb::FieldCodec.ForClass…
406 …private static readonly pb::FieldCodec<pb::ByteString> _single_bytesField_codec = pb::FieldCodec.F…
927 …private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Any> _repeated_anyFi…
[all …]
DUnittestProto3.cs551 private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec
552 = pb::FieldCodec.ForInt32(250);
563 private static readonly pb::FieldCodec<long> _repeated_repeatedInt64_codec
564 = pb::FieldCodec.ForInt64(258);
572 private static readonly pb::FieldCodec<uint> _repeated_repeatedUint32_codec
573 = pb::FieldCodec.ForUInt32(266);
581 private static readonly pb::FieldCodec<ulong> _repeated_repeatedUint64_codec
582 = pb::FieldCodec.ForUInt64(274);
590 private static readonly pb::FieldCodec<int> _repeated_repeatedSint32_codec
591 = pb::FieldCodec.ForSInt32(282);
[all …]
DUnittestIssues.cs369 …private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.NegativeEnum> _repeated_…
370 …= pb::FieldCodec.ForEnum(16, x => (int) x, x => (global::UnitTest.Issues.TestProtos.NegativeEnum) …
378 …private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.NegativeEnum> _repeated_…
379 …= pb::FieldCodec.ForEnum(26, x => (int) x, x => (global::UnitTest.Issues.TestProtos.NegativeEnum) …
592 private static readonly pb::FieldCodec<int> _repeated_primitiveArray_codec
593 = pb::FieldCodec.ForInt32(18);
613 …private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.DeprecatedChild> _repeat…
614 = pb::FieldCodec.ForMessage(34, global::UnitTest.Issues.TestProtos.DeprecatedChild.Parser);
634 …private static readonly pb::FieldCodec<global::UnitTest.Issues.TestProtos.DeprecatedEnum> _repeate…
635 …= pb::FieldCodec.ForEnum(50, x => (int) x, x => (global::UnitTest.Issues.TestProtos.DeprecatedEnum…
/external/protobuf/csharp/src/Google.Protobuf.Conformance/
DConformance.cs1097 private static readonly pb::FieldCodec<int> _repeated_repeatedInt32_codec
1098 = pb::FieldCodec.ForInt32(250);
1109 private static readonly pb::FieldCodec<long> _repeated_repeatedInt64_codec
1110 = pb::FieldCodec.ForInt64(258);
1118 private static readonly pb::FieldCodec<uint> _repeated_repeatedUint32_codec
1119 = pb::FieldCodec.ForUInt32(266);
1127 private static readonly pb::FieldCodec<ulong> _repeated_repeatedUint64_codec
1128 = pb::FieldCodec.ForUInt64(274);
1136 private static readonly pb::FieldCodec<int> _repeated_repeatedSint32_codec
1137 = pb::FieldCodec.ForSInt32(282);
[all …]
/external/protobuf/csharp/src/Google.Protobuf.Test/Collections/
DRepeatedFieldTest.cs243 field.AddEntriesFrom(input, FieldCodec.ForInt32(nonPackedTag)); in AddEntriesFrom_PackedInt32()
269 field.AddEntriesFrom(input, FieldCodec.ForInt32(packedTag)); in AddEntriesFrom_NonPackedInt32()
292 field.AddEntriesFrom(input, FieldCodec.ForString(tag)); in AddEntriesFrom_String()
316 field.AddEntriesFrom(input, FieldCodec.ForMessage(tag, ForeignMessage.Parser)); in AddEntriesFrom_Message()
328 field.WriteTo(output, FieldCodec.ForInt32(tag)); in WriteTo_PackedInt32()
349 field.WriteTo(output, FieldCodec.ForInt32(tag)); in WriteTo_NonPackedInt32()
370 field.WriteTo(output, FieldCodec.ForString(tag)); in WriteTo_String()
393 field.WriteTo(output, FieldCodec.ForMessage(tag, ForeignMessage.Parser)); in WriteTo_Message()
411 Assert.AreEqual(7, list.CalculateSize(FieldCodec.ForInt32(tag))); in CalculateSize_VariableSizeNonPacked()
420 Assert.AreEqual(15, list.CalculateSize(FieldCodec.ForSFixed32(tag))); in CalculateSize_FixedSizeNonPacked()
[all …]
/external/protobuf/csharp/src/Google.Protobuf/Reflection/
DDescriptor.cs203 …private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.FileDescriptorProto> _re…
204 … = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Reflection.FileDescriptorProto.Parser);
338 private static readonly pb::FieldCodec<string> _repeated_dependency_codec
339 = pb::FieldCodec.ForString(26);
350 private static readonly pb::FieldCodec<int> _repeated_publicDependency_codec
351 = pb::FieldCodec.ForInt32(80);
362 private static readonly pb::FieldCodec<int> _repeated_weakDependency_codec
363 = pb::FieldCodec.ForInt32(88);
375 …private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.DescriptorProto> _repeat…
376 = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.Reflection.DescriptorProto.Parser);
[all …]
/external/protobuf/csharp/src/Google.Protobuf/WellKnownTypes/
DType.cs142 …private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Field> _repeated_fie…
143 = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Field.Parser);
154 private static readonly pb::FieldCodec<string> _repeated_oneofs_codec
155 = pb::FieldCodec.ForString(26);
166 …private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_op…
167 = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.WellKnownTypes.Option.Parser);
467 …private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_op…
468 = pb::FieldCodec.ForMessage(74, global::Google.Protobuf.WellKnownTypes.Option.Parser);
866 …private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.EnumValue> _repeated…
867 = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.EnumValue.Parser);
[all …]
DApi.cs106 …private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Method> _repeated_me…
107 = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.WellKnownTypes.Method.Parser);
118 …private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_op…
119 = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.WellKnownTypes.Option.Parser);
176 …private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Mixin> _repeated_mix…
177 = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.WellKnownTypes.Mixin.Parser);
449 …private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Option> _repeated_op…
450 = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.WellKnownTypes.Option.Parser);
DFieldMask.cs219 private static readonly pb::FieldCodec<string> _repeated_paths_codec
220 = pb::FieldCodec.ForString(10);
DStruct.cs109 …global::Google.Protobuf.WellKnownTypes.Value>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.F…
527 …private static readonly pb::FieldCodec<global::Google.Protobuf.WellKnownTypes.Value> _repeated_val…
528 = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.WellKnownTypes.Value.Parser);
/external/protobuf/csharp/src/Google.Protobuf/Collections/
DRepeatedField.cs93 public void AddEntriesFrom(CodedInputStream input, FieldCodec<T> codec) in AddEntriesFrom()
100 if (FieldCodec<T>.IsPackedRepeatedField(tag)) in AddEntriesFrom()
130 public int CalculateSize(FieldCodec<T> codec) in CalculateSize()
156 private int CalculatePackedDataSize(FieldCodec<T> codec) in CalculatePackedDataSize()
181 public void WriteTo(CodedOutputStream output, FieldCodec<T> codec) in WriteTo()
DMapField.cs582 private readonly FieldCodec<TKey> keyCodec;
583 private readonly FieldCodec<TValue> valueCodec;
593 public Codec(FieldCodec<TKey> keyCodec, FieldCodec<TValue> valueCodec, uint mapTag) in Codec()
/external/protobuf/csharp/src/AddressBook/
DAddressbook.cs114 …private static readonly pb::FieldCodec<global::Google.Protobuf.Examples.AddressBook.Person.Types.P…
115 …= pb::FieldCodec.ForMessage(34, global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneNum…
403 …private static readonly pb::FieldCodec<global::Google.Protobuf.Examples.AddressBook.Person> _repea…
404 = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Examples.AddressBook.Person.Parser);
/external/protobuf/util/
DMakefile.am125 csharp/src/Google.Protobuf/FieldCodec.cs \
/external/protobuf/
DMakefile.am125 csharp/src/Google.Protobuf/FieldCodec.cs \