blob: e72a5011c28fe661944939998ffeaee597845002 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
using System;
namespace MediaBrowser.Model.Entities
{
public class MBRegistrationRecord
{
public DateTime ExpirationDate { get; set; }
public bool IsRegistered { get; set;}
public bool RegChecked { get; set; }
public bool RegError { get; set; }
private bool? _isInTrial;
public bool TrialVersion
{
get
{
if (_isInTrial == null)
{
if (!RegChecked) return false; //don't set this until we've successfully obtained exp date
_isInTrial = ExpirationDate > DateTime.Now;
}
return (_isInTrial.Value && !IsRegistered);
}
}
public bool IsValid
{
get { return !RegChecked || (IsRegistered || TrialVersion); }
}
}
}
|