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; } }
public void Logger( DifxLog EventType, Int32 ErrorCode, [MarshalAs(UnmanagedType.LPTStr)] String EventDescription, IntPtr CallbackContext) { if (onLogEvent != null) { onLogEvent(EventType, ErrorCode, EventDescription); } }
public void Logger( DifxLog eventType, int errorCode, [MarshalAs(UnmanagedType.LPTStr)] string eventDescription, IntPtr callbackContext) { if (OnLogEvent != null) { OnLogEvent(eventType, errorCode, eventDescription); } }
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; } }
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()); } }
public void Logger( DifxLog EventType, Int32 ErrorCode, [MarshalAs(UnmanagedType.LPTStr)] String EventDescription, IntPtr CallbackContext) { if (onLogEvent != null) onLogEvent(EventType, ErrorCode, EventDescription); }
public void Logger( DifxLog eventType, int errorCode, [MarshalAs(UnmanagedType.LPTStr)] string eventDescription, IntPtr callbackContext) { if (OnLogEvent != null) OnLogEvent(eventType, errorCode, eventDescription); }