예제 #1
0
 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.");
     }
 }
예제 #2
0
 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);
     }
 }
예제 #3
0
 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);
     }
 }