public void WithOptions(Action action, bool findSingle = BrowserOptions.FINDSINGLE_DEFAULT) { var memento = (BrowserOptions)this.Options.Clone(); this.Options.FindSingle = findSingle; action.Invoke(); this.Options = memento; }
public object Clone() { var options = new BrowserOptions { FindSingle = this.FindSingle, WaitWhileAjaxBeforeClick = this.WaitWhileAjaxBeforeClick }; return(options); }