コード例 #1
0
 public MessageDescriptorBuilder <T> Bool(int fieldNum, Func <T, bool> valueGetter, Action <T, bool> valueSetter, Func <T, bool> hasValueFunc = null)
 {
     return(Add(FieldSetting <T> .CreateBool(fieldNum, valueGetter, valueSetter, hasValueFunc)));
 }
コード例 #2
0
 public MessageDescriptorBuilder <T> Add(FieldSetting <T> fieldSetting)
 {
     this.fieldSettings.Add(fieldSetting);
     return(this);
 }
コード例 #3
0
 public MessageDescriptorBuilder <T> EnumPackedArray <E>(int fieldNum, Func <T, IEnumerable <E> > valueGetter, Action <T, E> oneValueSetter, Func <T, bool> hasValueFunc = null, bool canReadUnpacked = true)
 {
     return(Add(FieldSetting <T> .CreateEnumPackedArray <E>(fieldNum, valueGetter, oneValueSetter, hasValueFunc, canReadUnpacked)));
 }
コード例 #4
0
 public MessageDescriptorBuilder <T> MessageArray <EmbeddedT>(int fieldNum, Func <T, IEnumerable <EmbeddedT> > valueGetter, Action <T, EmbeddedT> oneValueSetter,
                                                              MessageDescriptor <EmbeddedT> embeddedDescriptor, Func <T, bool> hasValueFunc = null) where EmbeddedT : new()
 {
     return(Add(FieldSetting <T> .CreateMessageArray <EmbeddedT>(fieldNum, valueGetter, oneValueSetter, embeddedDescriptor, hasValueFunc)));
 }
コード例 #5
0
 public MessageDescriptorBuilder <T> BytesArray(int fieldNum, Func <T, IEnumerable <byte[]> > valueGetter, Action <T, byte[]> oneValueSetter, Func <T, bool> hasValueFunc = null)
 {
     return(Add(FieldSetting <T> .CreateBytesArray(fieldNum, valueGetter, oneValueSetter, hasValueFunc)));
 }
コード例 #6
0
 public MessageDescriptorBuilder <T> SFixed64Array(int fieldNum, Func <T, IEnumerable <long> > valueGetter, Action <T, long> oneValueSetter, Func <T, bool> hasValueFunc = null, bool canReadPacked = true)
 {
     return(Add(FieldSetting <T> .CreateSFixed64Array(fieldNum, valueGetter, oneValueSetter, hasValueFunc, canReadPacked)));
 }