Example #1
0
 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);
         }
     }
 }
Example #2
0
        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);
        }