示例#1
0
 public void SerializeEditable(EditableExpression expression, String name, IJsonWriter writer)
 {
     writer.Write(name, delegate
     {
         expression.Adapter.Take(new Write_NamedValueAdapter(JsonNames.InitialValue, writer), expression.InitialValue);
         expression.Adapter.Take(new Write_NamedValueAdapter(JsonNames.EditedValue, writer), expression.EditedValue);
         writer.Write(expression.LastOneModified, JsonNames.LastOneModified);
         writer.Write(expression.Comment, JsonNames.Comment);
         var issues = expression.Validate();
         this.validationSerializer.SerializeValidationIssuesIfAny(issues, writer);
     });
 }
示例#2
0
 public void Serialize(EditableExpression expression, String name, IJsonWriter writer, Decimal?displayValue)
 {
     writer.Write(name, delegate
     {
         writer.Write(expression.InitialValue, JsonNames.InitialValue);
         writer.Write(expression.EditedValue, JsonNames.EditedValue);
         writer.Write(displayValue, JsonNames.DisplayValue);
         writer.Write(expression.LastOneModified, JsonNames.LastOneModified);
         writer.Write(expression.Comment, JsonNames.Comment);
         var issues = expression.Validate();
         this.validationSerializer.SerializeValidationIssuesIfAny(issues, writer);
     });
 }