public static void SetValue <T>(this MPropertySettable self, string name, T value) { self.GetType().GetProperty(name).SetValue(self, value, null); }
public static void CopyPropertiesFrom(this MPropertySettable self, MPropertyGettable other) { self.GetProperties().Intersect(other.GetProperties()).ToList().ForEach( property => self.SetValue(property, other.GetValue(property))); }