public EventPublishingTests() { _eventList = new List <SimpleTextEvent>(); _simpleTextEventHandler = new SimpleTextEventHandler(_eventList); _easyEvents = new EasyEvents(); _easyEvents.Configure(new EasyEventsConfiguration { HandlerFactory = type => { return((type == typeof(IEventHandler <SimpleTextEvent>)) ? _simpleTextEventHandler : null); }, Store = new InMemoryEventStore() }); DateAbstraction.Pause(); // while (!System.Diagnostics.Debugger.IsAttached) //{ // System.Threading.Tasks.Task.Delay(100); //} }
/// <summary>Adds a ComboBox to the form.</summary> /// <param name="caption">The ComboBox's caption.</param> /// <param name="selectionHandler">The handler for the selection changed event.</param> /// <param name="options">The options to display in the ComboBox.</param> public SimpleComboBox AddComboBox(string caption, SimpleTextEventHandler selectionHandler, params string[] options) { return this.AddComboBox(caption, (scb, str) => selectionHandler.Invoke(str), options); }
/// <summary>Adds a text box to the form.</summary> /// <param name="caption">The caption for the text box.</param> /// <param name="inputHandler">The event handler for text input.</param> public SimpleTextBox AddTextBox(string caption, SimpleTextEventHandler inputHandler) { return this.AddTextBox(caption, (stb, txt) => inputHandler.Invoke(txt)); }
/// <summary>Adds a ComboBox to the form.</summary> /// <param name="caption">The ComboBox's caption.</param> /// <param name="selectionHandler">The handler for the selection changed event.</param> /// <param name="options">The options to display in the ComboBox.</param> public SimpleComboBox AddComboBox(string caption, SimpleTextEventHandler selectionHandler, params string[] options) { return(this.AddComboBox(caption, (scb, str) => selectionHandler.Invoke(str), options)); }
/// <summary>Adds a text box to the form.</summary> /// <param name="caption">The caption for the text box.</param> /// <param name="inputHandler">The event handler for text input.</param> public SimpleTextBox AddTextBox(string caption, SimpleTextEventHandler inputHandler) { return(this.AddTextBox(caption, (stb, txt) => inputHandler.Invoke(txt))); }