public object GetValue(object target) { var type = target.GetType(); object value = null; if (KeyAccess.HasAccessFor(type)) { var key = KeyAccess.GetId(target, type); var metadata = MetadataProvider.GetMetadata(key); value = Getter(metadata); } return(value); }
public void SetValue(object target, object value) { var type = target.GetType(); if (!KeyAccess.HasAccessFor(type)) { return; } var key = KeyAccess.GetId(target, type); var metadata = MetadataProvider.GetMetadata(key); Setter(metadata, value); }