/// <summary> /// Creates a FieldMaskTree for a given FieldMask. /// </summary> public FieldMaskTree(FieldMask mask) { MergeFromFieldMask(mask); }
private void WriteFieldMask(TextWriter writer, IMessage value) { var paths = (IList <string>)value.Descriptor.Fields[FieldMask.PathsFieldNumber].Accessor.GetValue(value); writer.Write(FieldMask.ToJson(paths, DiagnosticOnly)); }
private void WriteFieldMask(StringBuilder builder, IMessage value) { var paths = (IList <string>)value.Descriptor.Fields[FieldMask.PathsFieldNumber].Accessor.GetValue(value); builder.Append(FieldMask.ToJson(paths, DiagnosticOnly)); }