public void WebBrowserBase_UICuesEventHandler_AddRemove_ThrowsNotSupportedException() { using var control = new SubWebBrowserBase("8856f961-340a-11d0-a96b-00c04fd705a2"); UICuesEventHandler handler = (sender, e) => { }; Assert.Throws <NotSupportedException>(() => control.ChangeUICues += handler); control.ChangeUICues -= handler; }
/// <summary> /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed. /// <example> /// uicueseventhandler.BeginInvoke(sender, e, callback); /// </example> /// </summary> public static IAsyncResult BeginInvoke(this UICuesEventHandler uicueseventhandler, Object sender, UICuesEventArgs e, AsyncCallback callback) { if (uicueseventhandler == null) { throw new ArgumentNullException("uicueseventhandler"); } return(uicueseventhandler.BeginInvoke(sender, e, callback, null)); }