Beispiel #1
0
        private static void Logger(
            DifxLog eventType,
            int errorCode,
            [MarshalAs(UnmanagedType.LPTStr)] string eventDescription,
            IntPtr callbackContext)
        {
            switch (eventType)
            {
            case DifxLog.DIFXAPI_ERROR:
                Log.Error(eventDescription);
                break;

            case DifxLog.DIFXAPI_INFO:
                Log.Debug(eventDescription);
                break;

            case DifxLog.DIFXAPI_SUCCESS:
                Log.Info(eventDescription);
                break;

            case DifxLog.DIFXAPI_WARNING:
                Log.Warn(eventDescription);
                break;

            default:
                Log.WarnFormat("Unknown event type: {0}", eventType);
                break;
            }
        }
Beispiel #2
0
 public void Logger(
     DifxLog EventType,
     Int32 ErrorCode,
     [MarshalAs(UnmanagedType.LPTStr)] String EventDescription,
     IntPtr CallbackContext)
 {
     if (onLogEvent != null)
     {
         onLogEvent(EventType, ErrorCode, EventDescription);
     }
 }
Beispiel #3
0
 public void Logger(
     DifxLog eventType,
     int errorCode,
     [MarshalAs(UnmanagedType.LPTStr)] string eventDescription,
     IntPtr callbackContext)
 {
     if (OnLogEvent != null)
     {
         OnLogEvent(eventType, errorCode, eventDescription);
     }
 }
Beispiel #4
0
 private static void Logger(DifxLog Event, int error, string description)
 {
     switch (Event)
     {
         case DifxLog.DIFXAPI_ERROR:
             Log.Error(description);
             break;
         case DifxLog.DIFXAPI_INFO:
         case DifxLog.DIFXAPI_SUCCESS:
             Log.Info(description);
             break;
         case DifxLog.DIFXAPI_WARNING:
             Log.Warn(description);
             break;
     }
 }
Beispiel #5
0
        protected void Logger(DifxLog Event, Int32 Error, String Description)
        {
            if (tbOutput.InvokeRequired)
            {
                Difx.LogEventHandler d = new Difx.LogEventHandler(Logger);
                Invoke(d, new object[] { Event, Error, Description });
            }
            else
            {
                StringBuilder sb = new StringBuilder();

                sb.AppendFormat("{0} - {1}", Desc[(Int32)Event], Description);
                sb.AppendLine();

                tbOutput.AppendText(sb.ToString());
            }
        }
Beispiel #6
0
        private static void Logger(DifxLog Event, int error, string description)
        {
            switch (Event)
            {
            case DifxLog.DIFXAPI_ERROR:
                Log.Error(description);
                break;

            case DifxLog.DIFXAPI_INFO:
            case DifxLog.DIFXAPI_SUCCESS:
                Log.Info(description);
                break;

            case DifxLog.DIFXAPI_WARNING:
                Log.Warn(description);
                break;
            }
        }
Beispiel #7
0
 public void Logger(
             DifxLog EventType, 
             Int32 ErrorCode,
             [MarshalAs(UnmanagedType.LPTStr)] String EventDescription,
             IntPtr CallbackContext)
 {
     if (onLogEvent != null) onLogEvent(EventType, ErrorCode, EventDescription);
 }
Beispiel #8
0
 public void Logger(
     DifxLog eventType,
     int errorCode,
     [MarshalAs(UnmanagedType.LPTStr)] string eventDescription,
     IntPtr callbackContext)
 {
     if (OnLogEvent != null) OnLogEvent(eventType, errorCode, eventDescription);
 }