/// <summary> /// Called when [status changed]. /// </summary> /// <param name="code">The code.</param> /// <param name="message">The message.</param> protected virtual void OnStatusChanged(DispatcherStatus code, string message) { StatusChanged?.Invoke(this, new DataDispatchEventArgs { Code = code, Message = message }); }
/// <summary> /// Determines whether the specified status is a transmission state status /// </summary> /// <param name="status">The status.</param> /// <returns><c>true</c> if the specified status is transmitting; otherwise, <c>false</c>.</returns> public static bool IsTransmitting(this DispatcherStatus status) { return(status == DispatcherStatus.Connecting || status == DispatcherStatus.Transmitting); }