/// <summary> /// Gets the value of specified property. /// </summary> protected T GetProperty <T>(string name) { return((T)WrappedType.InvokeMember(name, BindingFlags.GetProperty, null, WrappedObject, null)); }
/// <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 }); }
/// <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)); }