/// <summary> /// Initializes a new instance of the <see cref="EventSource"/> class. /// </summary> /// <param name="requestUriString">The URL.</param> public EventSource(Uri requestUriString) { Url = requestUriString; Timeout = 100000; // 100 seconds _readyState = EventSourceState.Closed; }
public StateChangedEventArgs(EventSourceState state) { State = state; }
protected void OnStateChanged(EventSourceState newState) { StateChanged?.Invoke(this, new StateChangedEventArgs(newState)); }
protected void OnStateChanged(EventSourceState newState) { if (StateChanged != null) { StateChanged(this, new StateChangedEventArgs(newState)); } }