MBRegistrationRecord.cs 857 B

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