Example #1
0
 /// <summary>
 /// Event handler for error.
 /// </summary>
 /// <param name="sender">Sender object.</param>
 /// <param name="e">The event args.</param>
 private void OnProtocolError(object sender, SMProtocolErrorEventArgs e)
 {
     this.End(StatusCode.ProtocolError);
     if (this.OnError != null)
     {
         this.OnError(this, e);
     }
 }
 /// <summary>
 /// Event handler for SM session error.
 /// </summary>
 /// <param name="sender">The sender</param>
 /// <param name="e">Event data</param>
 private static void OnSessionError(object sender, SMProtocolErrorEventArgs e)
 {
     SMLogger.LogError("Session error: " + e.Exeption.Message);
     if (session.State == SMSessionState.Closed)
     {
         // server closed on error
         if (appScriptMode)
         {
             // abort execution with error code
             Environment.Exit(1);
         }
     }
 }
 /// <summary>
 /// Event handler for error.
 /// </summary>
 /// <param name="sender">Sender object.</param>
 /// <param name="e">The event args.</param>
 private void OnProtocolError(object sender, SMProtocolErrorEventArgs e)
 {
     this.End(StatusCode.ProtocolError);
     if (this.OnError != null)
     {
         this.OnError(this, e);
     }
 }
 /// <summary>
 /// Event handler for SM session error.
 /// </summary>
 /// <param name="sender">The sender</param>
 /// <param name="e">Event data</param>
 private static void OnSessionError(object sender, SMProtocolErrorEventArgs e)
 {
     SMLogger.LogError("Session error: " + e.Exeption.Message);
 }