PageRenderTime 22ms CodeModel.GetById 14ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/BlogEngine/DotNetSlave.BusinessLogic/Json/JsonPackage.cs

#
C# | 80 lines | 28 code | 0 blank | 52 comment | 0 complexity | cbcc422435316103025cc331635623c2 MD5 | raw file
 1namespace BlogEngine.Core.Json
 2{
 3    /// <summary>
 4    /// Json wrapper for package object
 5    /// </summary>
 6    public class JsonPackage
 7    {
 8        /// <summary>
 9        /// Package Id
10        /// </summary>
11        public string Id { get; set; }
12        /// <summary>
13        /// Package type
14        /// </summary>
15        public string PackageType { get; set; }
16        /// <summary>
17        /// Title
18        /// </summary>
19        public string Title { get; set; }
20        /// <summary>
21        /// Local Version
22        /// </summary>
23        public string LocalVersion { get; set; }
24        /// <summary>
25        /// Online version
26        /// </summary>
27        public string OnlineVersion { get; set; }
28        /// <summary>
29        /// Desctiption
30        /// </summary>
31        public string Description { get; set; }
32        /// <summary>
33        /// Download count
34        /// </summary>
35        public int DownloadCount { get; set; }
36        /// <summary>
37        /// Last updated
38        /// </summary>
39        public string LastUpdated { get; set; }
40        /// <summary>
41        /// Project Website
42        /// </summary>
43        public string Website { get; set; }
44        /// <summary>
45        /// Package url in the server gallery
46        /// </summary>
47        public string PackageUrl { get; set; }
48        /// <summary>
49        /// Icon URL
50        /// </summary>
51        public string IconUrl { get; set; }
52        /// <summary>
53        ///  Authors
54        /// </summary>
55        public string Authors { get; set; }
56        /// <summary>
57        /// Tags
58        /// </summary>
59        public string Tags { get; set; }
60        /// <summary>
61        /// Package location
62        /// L - local; G - gallery; I - both (installed)
63        /// </summary>
64        public string Location { get; set; }
65        /// <summary>
66        /// Package rating
67        /// </summary>
68        public double Rating { get; set; }
69        /// <summary>
70        /// If update available in the gallery
71        /// </summary>
72        public bool UpdateAvailable
73        {
74            get
75            {
76                return Packaging.Gallery.ConvertVersion(LocalVersion) < Packaging.Gallery.ConvertVersion(OnlineVersion);
77            }
78        }
79    }
80}