Exemple #1
0
 public void OnOutputMessage(string outputMessage, enum_MESSAGETYPE messageType)
 {
     try
     {
         var eventObject = new AD7MessageEvent(outputMessage, messageType, isAsync: false, severity: AD7MessageEvent.Severity.Warning);
         Send(eventObject, AD7MessageEvent.IID, null);
     }
     catch
     {
         // Since we are often trying to report an exception, if something goes wrong we don't want to take down the process,
         // so ignore the failure.
     }
 }
Exemple #2
0
        private void SendMessage(string message, OutputMessage.Severity severity, bool isAsync)
        {
            try
            {
                // IDebugErrorEvent2 is used to report error messages to the user when something goes wrong in the debug engine.
                // The sample engine doesn't take advantage of this.

                AD7MessageEvent eventObject = new AD7MessageEvent(new OutputMessage(message, enum_MESSAGETYPE.MT_MESSAGEBOX, severity), isAsync);
                Send(eventObject, AD7MessageEvent.IID, null);
            }
            catch
            {
                // Since we are often trying to report an exception, if something goes wrong we don't want to take down the process,
                // so ignore the failure.
            }
        }
Exemple #3
0
 public void OnOutputMessage(OutputMessage outputMessage)
 {
     try
     {
         if (outputMessage.ErrorCode == 0)
         {
             var eventObject = new AD7MessageEvent(outputMessage, isAsync: true);
             Send(eventObject, AD7MessageEvent.IID, null);
         }
         else
         {
             var eventObject = new AD7ErrorEvent(outputMessage, isAsync: true);
             Send(eventObject, AD7ErrorEvent.IID, null);
         }
     }
     catch
     {
         // Since we are often trying to report an exception, if something goes wrong we don't want to take down the process,
         // so ignore the failure.
     }
 }
Exemple #4
0
 int IDebugErrorEvent2.GetErrorMessage(enum_MESSAGETYPE[] pMessageType, out string errorFormat, out int hrErrorReason, out uint pdwType, out string helpFilename, out uint pdwHelpId)
 {
     hrErrorReason = unchecked ((int)_outputMessage.ErrorCode);
     return(AD7MessageEvent.ConvertMessageToAD7(_outputMessage, pMessageType, out errorFormat, out pdwType, out helpFilename, out pdwHelpId));
 }
Exemple #5
0
        private void SendMessage(string message, OutputMessage.Severity severity, bool isAsync)
        {
            try
            {
                // IDebugErrorEvent2 is used to report error messages to the user when something goes wrong in the debug engine.
                // The sample engine doesn't take advantage of this.

                AD7MessageEvent eventObject = new AD7MessageEvent(new OutputMessage(message, enum_MESSAGETYPE.MT_MESSAGEBOX, severity), isAsync);
                Send(eventObject, AD7MessageEvent.IID, null);
            }
            catch
            {
                // Since we are often trying to report an exception, if something goes wrong we don't want to take down the process,
                // so ignore the failure.
            }
        }
Exemple #6
0
 public void OnOutputMessage(OutputMessage outputMessage)
 {
     try
     {
         if (outputMessage.ErrorCode == 0)
         {
             var eventObject = new AD7MessageEvent(outputMessage, isAsync: true);
             Send(eventObject, AD7MessageEvent.IID, null);
         }
         else
         {
             var eventObject = new AD7ErrorEvent(outputMessage, isAsync: true);
             Send(eventObject, AD7ErrorEvent.IID, null);
         }
     }
     catch
     {
         // Since we are often trying to report an exception, if something goes wrong we don't want to take down the process,
         // so ignore the failure.
     }
 }
Exemple #7
0
 public void OnOutputMessage(string outputMessage, enum_MESSAGETYPE messageType)
 {
     try
     {
         var eventObject = new AD7MessageEvent(outputMessage, messageType, isAsync: false, severity: AD7MessageEvent.Severity.Warning);
         Send(eventObject, AD7MessageEvent.IID, null);
     }
     catch
     {
         // Since we are often trying to report an exception, if something goes wrong we don't want to take down the process,
         // so ignore the failure.
     }
 }