|   |  | 1 |  | using System; | 
|   |  | 2 |  | using System.Xml.Serialization; | 
|   |  | 3 |  |  | 
|   |  | 4 |  | namespace MediaBrowser.Model.Configuration | 
|   |  | 5 |  | { | 
|   |  | 6 |  |     /// <summary> | 
|   |  | 7 |  |     /// Serves as a common base class for the Server and UI application Configurations | 
|   |  | 8 |  |     /// ProtoInclude tells Protobuf about subclasses, | 
|   |  | 9 |  |     /// The number 50 can be any number, so long as it doesn't clash with any of the ProtoMember numbers either here or  | 
|   |  | 10 |  |     /// </summary> | 
|   |  | 11 |  |     public class BaseApplicationConfiguration | 
|   |  | 12 |  |     { | 
|   |  | 13 |  |         /// <summary> | 
|   |  | 14 |  |         /// Initializes a new instance of the <see cref="BaseApplicationConfiguration" /> class. | 
|   |  | 15 |  |         /// </summary> | 
|   |  | 16 |  |         public BaseApplicationConfiguration() | 
|   |  | 17 |  |         { | 
|   | 224 | 18 |  |             LogFileRetentionDays = 3; | 
|   | 224 | 19 |  |         } | 
|   |  | 20 |  |  | 
|   |  | 21 |  |         /// <summary> | 
|   |  | 22 |  |         /// Gets or sets the number of days we should retain log files. | 
|   |  | 23 |  |         /// </summary> | 
|   |  | 24 |  |         /// <value>The log file retention days.</value> | 
|   |  | 25 |  |         public int LogFileRetentionDays { get; set; } | 
|   |  | 26 |  |  | 
|   |  | 27 |  |         /// <summary> | 
|   |  | 28 |  |         /// Gets or sets a value indicating whether this instance is first run. | 
|   |  | 29 |  |         /// </summary> | 
|   |  | 30 |  |         /// <value><c>true</c> if this instance is first run; otherwise, <c>false</c>.</value> | 
|   |  | 31 |  |         public bool IsStartupWizardCompleted { get; set; } | 
|   |  | 32 |  |  | 
|   |  | 33 |  |         /// <summary> | 
|   |  | 34 |  |         /// Gets or sets the cache path. | 
|   |  | 35 |  |         /// </summary> | 
|   |  | 36 |  |         /// <value>The cache path.</value> | 
|   |  | 37 |  |         public string? CachePath { get; set; } | 
|   |  | 38 |  |  | 
|   |  | 39 |  |         /// <summary> | 
|   |  | 40 |  |         /// Gets or sets the last known version that was ran using the configuration. | 
|   |  | 41 |  |         /// </summary> | 
|   |  | 42 |  |         /// <value>The version from previous run.</value> | 
|   |  | 43 |  |         [XmlIgnore] | 
|   |  | 44 |  |         public Version? PreviousVersion { get; set; } | 
|   |  | 45 |  |  | 
|   |  | 46 |  |         /// <summary> | 
|   |  | 47 |  |         /// Gets or sets the stringified PreviousVersion to be stored/loaded, | 
|   |  | 48 |  |         /// because System.Version itself isn't xml-serializable. | 
|   |  | 49 |  |         /// </summary> | 
|   |  | 50 |  |         /// <value>String value of PreviousVersion.</value> | 
|   |  | 51 |  |         public string? PreviousVersionStr | 
|   |  | 52 |  |         { | 
|   | 143 | 53 |  |             get => PreviousVersion?.ToString(); | 
|   |  | 54 |  |             set | 
|   |  | 55 |  |             { | 
|   | 4 | 56 |  |                 if (Version.TryParse(value, out var version)) | 
|   |  | 57 |  |                 { | 
|   | 0 | 58 |  |                     PreviousVersion = version; | 
|   |  | 59 |  |                 } | 
|   | 4 | 60 |  |             } | 
|   |  | 61 |  |         } | 
|   |  | 62 |  |     } | 
|   |  | 63 |  | } |