예제 #1
0
 /// <summary>
 /// Checks for a condition and displays a message if the condition is false.
 /// </summary>
 /// <param name="edc">The <see cref="Entities"/> object.</param>
 /// <param name="condition"> <c>true</c> to prevent a message being displayed; otherwise, false.</param>
 /// <param name="source">The source of the assertion.</param>
 /// <param name="message">The message to log.</param>
 public static void Assert(Entities edc, bool condition, string source, string message)
 {
     if (condition)
     {
         return;
     }
     ActivityLogCT.WriteEntry(edc, source, message);
 }
예제 #2
0
 /// <summary>
 /// Writes an entry with the given message text and application-defined event identifier to the event log list.
 /// </summary>
 /// <param name="source">The source denominator of the message.</param>
 /// <param name="message">The string to write to the event log.</param>
 /// <param name="url">The URL.</param>
 public static void WriteEntry(string source, string message, string url)
 {
     using (Entities edc = new Entities(url))
         ActivityLogCT.WriteEntry(edc, source, message);
 }