Пример #1
0
 /// <summary>
 /// Gets the value of specified property.
 /// </summary>
 protected T GetProperty <T>(string name)
 {
     return((T)WrappedType.InvokeMember(name, BindingFlags.GetProperty, null, WrappedObject, null));
 }
Пример #2
0
 /// <summary>
 /// Sets the value of specified property.
 /// </summary>
 protected void SetProperty(string name, object value)
 {
     WrappedType.InvokeMember(name, BindingFlags.SetProperty, null, WrappedObject, new object[] { value });
 }
Пример #3
0
 /// <summary>
 /// Invokes the method with specified name.
 /// </summary>
 protected object InvokeMethod(string name, params object[] args)
 {
     return(WrappedType.InvokeMember(name, BindingFlags.InvokeMethod, null, WrappedObject, args != null && args.Length == 0 ? null : args));
 }