Пример #1
0
 // --------------------------------------------------------------------------------
 /// <summary>
 /// Creates a log entry with the specified type and message.
 /// </summary>
 /// <param name="type">Type of the log entry</param>
 /// <param name="message">Message string</param>
 // --------------------------------------------------------------------------------
 public ActivityLogEntry(ActivityLogEntryType type, string message)
 {
     Hr      = null;
     Guid    = null;
     Type    = type;
     Message = message;
 }
Пример #2
0
        private static void LogEntry(ActivityLogEntryType type, string source, string message)
        {
            IVsActivityLog log = Log;

            if (log != null)
            {
                log.LogEntry(VsxConverter.MapLogTypeToAle(type), source, message);
            }
        }
Пример #3
0
        private static void LogEntryGuidHr(ActivityLogEntryType type, string source, string message,
                                           Guid guid, int hr)
        {
            IVsActivityLog log = Log;

            if (log != null)
            {
                log.LogEntryGuidHr(VsxConverter.MapLogTypeToAle(type), source, message, guid, hr);
            }
        }
Пример #4
0
        private static void LogEntryHrPath(ActivityLogEntryType type, string source, string message,
                                           int hr, string path)
        {
            IVsActivityLog log = Log;

            if (log != null)
            {
                log.LogEntryHrPath(VsxConverter.MapLogTypeToAle(type), source, message, hr, path);
            }
        }
Пример #5
0
        // --------------------------------------------------------------------------------
        /// <summary>
        /// Converts <see cref="ActivityLogEntryType"/> values to corresponding UInt32 values.
        /// </summary>
        /// <param name="logType">ActivitiLogType value to convert.</param>
        /// <returns>
        /// UInt32 representation of the ActivityLogEntryType input.
        /// </returns>
        // --------------------------------------------------------------------------------
        public static UInt32 MapLogTypeToAle(ActivityLogEntryType logType)
        {
            switch (logType)
            {
            case ActivityLogEntryType.Information:
                return((UInt32)__ACTIVITYLOG_ENTRYTYPE.ALE_INFORMATION);

            case ActivityLogEntryType.Warning:
                return((UInt32)__ACTIVITYLOG_ENTRYTYPE.ALE_WARNING);

            default:
                return((UInt32)__ACTIVITYLOG_ENTRYTYPE.ALE_ERROR);
            }
        }
Пример #6
0
 // --------------------------------------------------------------------------------
 /// <summary>
 /// Creates a log entry with the specified type, source and message.
 /// </summary>
 /// <param name="type">Type of the log entry</param>
 /// <param name="source">Source string</param>
 /// <param name="message">Message string</param>
 // --------------------------------------------------------------------------------
 public ActivityLogEntry(ActivityLogEntryType type, string source, string message)
 {
     Hr = null;
       Guid = null;
       Type = type;
       Source = source;
       Message = message;
 }
Пример #7
0
 private static void LogEntryGuidHr(ActivityLogEntryType type, string source, string message,
     Guid guid, int hr)
 {
     IVsActivityLog log = Log;
       if (log != null)
       {
     log.LogEntryGuidHr(VsxConverter.MapLogTypeToAle(type), source, message, guid, hr);
       }
 }
Пример #8
0
 private static void LogEntryPath(ActivityLogEntryType type, string source, string message,
     string path)
 {
     IVsActivityLog log = Log;
       if (log != null)
       {
     log.LogEntryPath(VsxConverter.MapLogTypeToAle(type), source, message, path);
       }
 }
Пример #9
0
 // --------------------------------------------------------------------------------
 /// <summary>
 /// Creates an activity log entry with the specified type, source, message, GUID, 
 /// HRESULT and path.
 /// </summary>
 /// <param name="type">Entry type</param>
 /// <param name="source">Event source</param>
 /// <param name="message">Event message</param>
 /// <param name="guid">GUID of the entry</param>
 /// <param name="hr">HRESULT of the entry</param>
 /// <param name="path">Path of the message</param>
 // --------------------------------------------------------------------------------
 public static void Write(ActivityLogEntryType type, string source, string message, Guid guid, int hr, string path)
 {
     LogEntryGuidHrPath(type, source, message, guid, hr, path);
 }
Пример #10
0
 // --------------------------------------------------------------------------------
 /// <summary>
 /// Creates an activity log entry with the specified type, source, message 
 /// and path.
 /// </summary>
 /// <param name="type">Entry type</param>
 /// <param name="source">Event source</param>
 /// <param name="message">Event message</param>
 /// <param name="path">Path of the message</param>
 // --------------------------------------------------------------------------------
 public static void Write(ActivityLogEntryType type, string source, string message, string path)
 {
     LogEntryPath(type, source, message, path);
 }
Пример #11
0
 // --------------------------------------------------------------------------------
 /// <summary>
 /// Creates an activity log entry with the specified type, source, message 
 /// and GUID.
 /// </summary>
 /// <param name="type">Entry type</param>
 /// <param name="source">Event source</param>
 /// <param name="message">Event message</param>
 /// <param name="guid">GUID of the entry</param>
 // --------------------------------------------------------------------------------
 public static void Write(ActivityLogEntryType type, string source, string message, Guid guid)
 {
     LogEntryGuid(type, source, message, guid);
 }
Пример #12
0
 // --------------------------------------------------------------------------------
 /// <summary>
 /// Creates an activity log entry with the specified type, source, message 
 /// and HRESULT.
 /// </summary>
 /// <param name="type">Entry type</param>
 /// <param name="source">Event source</param>
 /// <param name="message">Event message</param>
 /// <param name="hr">HRESULT of the entry</param>
 // --------------------------------------------------------------------------------
 public static void Write(ActivityLogEntryType type, string source, string message, int hr)
 {
     LogEntryHr(type, source, message, hr);
 }
Пример #13
0
 // --------------------------------------------------------------------------------
 /// <summary>
 /// Converts <see cref="ActivityLogEntryType"/> values to corresponding UInt32 values.
 /// </summary>
 /// <param name="logType">ActivitiLogType value to convert.</param>
 /// <returns>
 /// UInt32 representation of the ActivityLogEntryType input.
 /// </returns>
 // --------------------------------------------------------------------------------
 public static UInt32 MapLogTypeToAle(ActivityLogEntryType logType)
 {
     switch (logType)
       {
     case ActivityLogEntryType.Information:
       return (UInt32)__ACTIVITYLOG_ENTRYTYPE.ALE_INFORMATION;
     case ActivityLogEntryType.Warning:
       return (UInt32)__ACTIVITYLOG_ENTRYTYPE.ALE_WARNING;
     default:
       return (UInt32)__ACTIVITYLOG_ENTRYTYPE.ALE_ERROR;
       }
 }
Пример #14
0
 // --------------------------------------------------------------------------------
 /// <summary>
 /// Creates an activity log entry with the specified type, source and message.
 /// </summary>
 /// <param name="type">Entry type</param>
 /// <param name="source">Event source</param>
 /// <param name="message">Event message</param>
 // --------------------------------------------------------------------------------
 public static void Write(ActivityLogEntryType type, string source, string message)
 {
     LogEntry(type, source, message);
 }
Пример #15
0
 // --------------------------------------------------------------------------------
 /// <summary>
 /// Creates an activity log entry with the specified type, source and message.
 /// </summary>
 /// <param name="type">Entry type</param>
 /// <param name="source">Event source</param>
 /// <param name="message">Event message</param>
 // --------------------------------------------------------------------------------
 public static void Write(ActivityLogEntryType type, string source, string message)
 {
     LogEntry(type, source, message);
 }
Пример #16
0
 // --------------------------------------------------------------------------------
 /// <summary>
 /// Creates an activity log entry with the specified type, source, message
 /// and GUID.
 /// </summary>
 /// <param name="type">Entry type</param>
 /// <param name="source">Event source</param>
 /// <param name="message">Event message</param>
 /// <param name="guid">GUID of the entry</param>
 // --------------------------------------------------------------------------------
 public static void Write(ActivityLogEntryType type, string source, string message, Guid guid)
 {
     LogEntryGuid(type, source, message, guid);
 }
Пример #17
0
 // --------------------------------------------------------------------------------
 /// <summary>
 /// Creates an activity log entry with the specified type, source, message
 /// and HRESULT.
 /// </summary>
 /// <param name="type">Entry type</param>
 /// <param name="source">Event source</param>
 /// <param name="message">Event message</param>
 /// <param name="hr">HRESULT of the entry</param>
 // --------------------------------------------------------------------------------
 public static void Write(ActivityLogEntryType type, string source, string message, int hr)
 {
     LogEntryHr(type, source, message, hr);
 }
Пример #18
0
 // --------------------------------------------------------------------------------
 /// <summary>
 /// Creates an activity log entry with the specified type, source, message, GUID,
 /// HRESULT and path.
 /// </summary>
 /// <param name="type">Entry type</param>
 /// <param name="source">Event source</param>
 /// <param name="message">Event message</param>
 /// <param name="guid">GUID of the entry</param>
 /// <param name="hr">HRESULT of the entry</param>
 /// <param name="path">Path of the message</param>
 // --------------------------------------------------------------------------------
 public static void Write(ActivityLogEntryType type, string source, string message, Guid guid, int hr, string path)
 {
     LogEntryGuidHrPath(type, source, message, guid, hr, path);
 }
Пример #19
0
 // --------------------------------------------------------------------------------
 /// <summary>
 /// Creates an activity log entry with the specified type, source, message
 /// and path.
 /// </summary>
 /// <param name="type">Entry type</param>
 /// <param name="source">Event source</param>
 /// <param name="message">Event message</param>
 /// <param name="path">Path of the message</param>
 // --------------------------------------------------------------------------------
 public static void Write(ActivityLogEntryType type, string source, string message, string path)
 {
     LogEntryPath(type, source, message, path);
 }