Пример #1
0
 public static void SetValue <T>(this MPropertySettable self, string name, T value)
 {
     self.GetType().GetProperty(name).SetValue(self, value, null);
 }
Пример #2
0
 public static void CopyPropertiesFrom(this MPropertySettable self, MPropertyGettable other)
 {
     self.GetProperties().Intersect(other.GetProperties()).ToList().ForEach(
         property => self.SetValue(property, other.GetValue(property)));
 }