/// <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;
 }
Example #3
0
 protected void OnStateChanged(EventSourceState newState)
 {
     StateChanged?.Invoke(this, new StateChangedEventArgs(newState));
 }
Example #4
0
 public StateChangedEventArgs(EventSourceState state)
 {
     State = state;
 }
 protected void OnStateChanged(EventSourceState newState)
 {
     if (StateChanged != null)
     {
         StateChanged(this, new StateChangedEventArgs(newState));
     }
 }