LogTextWritingParameters.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. namespace Wayne.Lib.Log
  2. {
  3. /// <summary>
  4. /// A set of parameters to control how to log an LogEntry as a string line.
  5. /// </summary>
  6. public class LogTextWritingParameters
  7. {
  8. #region Construction
  9. internal LogTextWritingParameters(string dateTimeFormat, EntityLogKind entityLogKind, bool suppressCategory, bool keepFileOpened)
  10. {
  11. DateTimeFormat = dateTimeFormat;
  12. EntityLogKind = entityLogKind;
  13. SuppressCategory = suppressCategory;
  14. KeepFileOpened = keepFileOpened;
  15. }
  16. #endregion
  17. #region Properties
  18. /// <summary>
  19. /// The format of the DateTime.
  20. /// </summary>
  21. public string DateTimeFormat { get; private set; }
  22. /// <summary>
  23. /// The details of the identifiable entity.
  24. /// </summary>
  25. public EntityLogKind EntityLogKind { get; private set; }
  26. /// <summary>
  27. /// Should the category be suppressed or not.
  28. /// </summary>
  29. public bool SuppressCategory { get; private set; }
  30. /// <summary>
  31. /// Should the file be kept open or closed after each write.
  32. /// </summary>
  33. public bool KeepFileOpened { get; private set; }
  34. #endregion
  35. }
  36. }