public virtual void Inject(object instance, string property, object @value) { Net.Vpc.Upa.Impl.Util.BeanAdapterAttribute attrAdapter = GetAttrAdapter(property); if (attrAdapter != null) { attrAdapter.SetValue(instance, @value); } else { System.Console.Error.WriteLine("inject " + property + " into " + instance.GetType() + " failed."); } }
public virtual bool ResetToDefaultValue(object instance, string field) /* throws Net.Vpc.Upa.Exceptions.UPAException */ { Net.Vpc.Upa.Impl.Util.BeanAdapterAttribute attrAdapter = GetAttrAdapter(field); if (attrAdapter != null) { attrAdapter.SetValue(instance, attrAdapter.GetDefaultValue()); return(true); } else { return(false); } }
public virtual bool SetProperty(object instance, string property, object @value) { Net.Vpc.Upa.Impl.Util.BeanAdapterAttribute attrAdapter = GetAttrAdapter(property); if (attrAdapter != null) { attrAdapter.SetValue(instance, @value); return(true); } else { return(false); } }