Esempio n. 1
0
 /// <summary>
 /// Use this to log info before an entity is removed to the DataContext.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="log"></param>
 /// <param name="entity"></param>
 public static void EntityRemove <T>(ILog log, T entity) where T : class
 {
     LoggedActionFactory.EntityInfo(log, "Removing {0}".FormatWith(log.Logger.Name), entity);
 }
Esempio n. 2
0
 /// <summary>
 /// Use this to log info after an entity is added.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="log"></param>
 /// <param name="entity"></param>
 public static void AfterEntityAdd <T>(ILog log, T entity) where T : class
 {
     LoggedActionFactory.EntityInfo(log, "Added {0}".FormatWith(log.Logger.Name), entity);
 }
Esempio n. 3
0
 /// <summary>
 /// Use this to log info before an entity is validated for an removal.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="log"></param>
 /// <param name="entity"></param>
 public static void BeforeEntityRemove <T>(ILog log, T entity) where T : class
 {
     LoggedActionFactory.EntityInfo(log, "Attempting to remove {0}".FormatWith(log.Logger.Name), entity);
 }
Esempio n. 4
0
 /// <summary>
 /// Generic fatal logging method
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="log"></param>
 /// <param name="message"></param>
 /// <param name="entity"></param>
 public static void Fatal <T>(ILog log, string message)
 {
     LoggedActionFactory.Fatal(log, message, (object)null);
 }