private void Set(string name, object value) { if (Wrapped != null) { PropertyInfo property = WrappedType.GetProperty(name); if (property != null && property.CanWrite) { property.SetValue(Wrapped, value, null); } } }
private object Get(string name) { if (Wrapped != null) { PropertyInfo prop = WrappedType.GetProperty(name); if (prop != null) { try { return(prop.GetValue(Wrapped, null)); } catch// (Exception ex) { return(null); } } } return(null); }