/// <summary>
 /// Initializes a new instance.
 /// </summary>
 /// <param name="serializer">The underlying serializer.</param>
 public PackedRepeatedSerializer(SerializerWithWireType serializer)
 {
     this.serializer = serializer;
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance.
 /// </summary>
 /// <param name="fieldNumber">The field number the serializer is used for.</param>
 /// <param name="serializer">The underlying serializer.</param>
 public RepeatedSerializer(uint fieldNumber, SerializerWithWireType serializer)
 {
     this.fieldNumber = fieldNumber;
     this.serializer = serializer;
 }
示例#3
0
 /// <summary>
 /// Initializes a new instance.
 /// </summary>
 /// <param name="serializer">The underlying serializer.</param>
 /// <param name="allowNull">
 /// Defines whether <c>null</c> is allowed
 /// as a field value.
 /// </param>
 public NullProxySerializer(SerializerWithWireType serializer,
     bool allowNull)
 {
     this.serializer = serializer;
     this.allowNull = allowNull;
 }
 public static bool TryGetSerializer(Type type,
     out SerializerWithWireType serializer)
 {
     return Cache.TryGetValue(type, out serializer);
 }
示例#5
0
 public BuildingSerializer(SerializerWithWireType serializer,
     IValueBuilder builder)
 {
     this.serializer = serializer;
     this.builder = builder;
 }