BaseApplicationConfiguration.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using MediaBrowser.Model.Updates;
  2. namespace MediaBrowser.Model.Configuration
  3. {
  4. /// <summary>
  5. /// Serves as a common base class for the Server and UI application Configurations
  6. /// ProtoInclude tells Protobuf about subclasses,
  7. /// The number 50 can be any number, so long as it doesn't clash with any of the ProtoMember numbers either here or in subclasses.
  8. /// </summary>
  9. public class BaseApplicationConfiguration
  10. {
  11. /// <summary>
  12. /// Gets or sets a value indicating whether [enable debug level logging].
  13. /// </summary>
  14. /// <value><c>true</c> if [enable debug level logging]; otherwise, <c>false</c>.</value>
  15. public bool EnableDebugLevelLogging { get; set; }
  16. /// <summary>
  17. /// Enable automatically and silently updating of the application
  18. /// </summary>
  19. /// <value><c>true</c> if [enable auto update]; otherwise, <c>false</c>.</value>
  20. public bool EnableAutoUpdate { get; set; }
  21. /// <summary>
  22. /// Gets of sets a value indicating the level of system updates (Release, Beta, Dev)
  23. /// </summary>
  24. public PackageVersionClass SystemUpdateLevel { get; set; }
  25. /// <summary>
  26. /// The number of days we should retain log files
  27. /// </summary>
  28. /// <value>The log file retention days.</value>
  29. public int LogFileRetentionDays { get; set; }
  30. /// <summary>
  31. /// Gets or sets a value indicating whether [run at startup].
  32. /// </summary>
  33. /// <value><c>true</c> if [run at startup]; otherwise, <c>false</c>.</value>
  34. public bool RunAtStartup { get; set; }
  35. /// <summary>
  36. /// Gets or sets a value indicating whether this instance is first run.
  37. /// </summary>
  38. /// <value><c>true</c> if this instance is first run; otherwise, <c>false</c>.</value>
  39. public bool IsStartupWizardCompleted { get; set; }
  40. /// <summary>
  41. /// Initializes a new instance of the <see cref="BaseApplicationConfiguration" /> class.
  42. /// </summary>
  43. public BaseApplicationConfiguration()
  44. {
  45. EnableAutoUpdate = true;
  46. LogFileRetentionDays = 14;
  47. #if (DEBUG)
  48. EnableDebugLevelLogging = true;
  49. #endif
  50. }
  51. }
  52. }