QuickConnectResult.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using System;
  2. namespace MediaBrowser.Model.QuickConnect
  3. {
  4. /// <summary>
  5. /// Stores the state of an quick connect request.
  6. /// </summary>
  7. public class QuickConnectResult
  8. {
  9. /// <summary>
  10. /// Initializes a new instance of the <see cref="QuickConnectResult"/> class.
  11. /// </summary>
  12. /// <param name="secret">The secret used to query the request state.</param>
  13. /// <param name="code">The code used to allow the request.</param>
  14. /// <param name="dateAdded">The time when the request was created.</param>
  15. public QuickConnectResult(string secret, string code, DateTime dateAdded)
  16. {
  17. Secret = secret;
  18. Code = code;
  19. DateAdded = dateAdded;
  20. }
  21. /// <summary>
  22. /// Gets a value indicating whether this request is authorized.
  23. /// </summary>
  24. public bool Authenticated => Authentication != null;
  25. /// <summary>
  26. /// Gets the secret value used to uniquely identify this request. Can be used to retrieve authentication information.
  27. /// </summary>
  28. public string Secret { get; }
  29. /// <summary>
  30. /// Gets the user facing code used so the user can quickly differentiate this request from others.
  31. /// </summary>
  32. public string Code { get; }
  33. /// <summary>
  34. /// Gets or sets the private access token.
  35. /// </summary>
  36. public Guid? Authentication { get; set; }
  37. /// <summary>
  38. /// Gets or sets the DateTime that this request was created.
  39. /// </summary>
  40. public DateTime DateAdded { get; set; }
  41. }
  42. }