public static Type GetPropertyType(this IMixin self, string name) { var property = self.GetType().GetProperty(name); if (property != null) { return(self.GetType().GetProperty(name).PropertyType); } var value = self.GetPropertyInternal(name); return(value == null || value == Value.Undefined ? null : value.GetType()); }
public static object GetProperty(this IMixin self, string name) { EnsurePropertyName(ref name); var type = self.GetPropertyType(name); var value = self.GetPropertyInternal(name); if (type != null && value == Value.Undefined) { return(type.GetDefaultValue()); } return(value == Value.Undefined ? null : value); }