예제 #1
0
 private Change Inc(string part)
 {
     var val = Get(part);
     var change = new Change
     {
         From = val,
         To = ++val
     };
     Set(part, change.To);
     return change;
 }
예제 #2
0
 private Change Set(XElement elem, int val)
 {
     var attr = elem.Attribute("value");
     var change = new Change { From = Get(attr), To = val };
     attr.SetValue(val);
     return change;
 }