コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }