NetworkStatus.cs 1.1 KB

123456789101112131415161718192021222324252627282930
  1. 
  2. namespace MediaBrowser.Model.ApiClient
  3. {
  4. public class NetworkStatus
  5. {
  6. /// <summary>
  7. /// Gets or sets a value indicating whether this instance is network available.
  8. /// </summary>
  9. /// <value><c>true</c> if this instance is network available; otherwise, <c>false</c>.</value>
  10. public bool IsNetworkAvailable { get; set; }
  11. /// <summary>
  12. /// Gets or sets a value indicating whether this instance is local network available.
  13. /// </summary>
  14. /// <value><c>null</c> if [is local network available] contains no value, <c>true</c> if [is local network available]; otherwise, <c>false</c>.</value>
  15. public bool? IsLocalNetworkAvailable { get; set; }
  16. /// <summary>
  17. /// Gets the is any local network available.
  18. /// </summary>
  19. /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
  20. public bool GetIsAnyLocalNetworkAvailable()
  21. {
  22. if (!IsLocalNetworkAvailable.HasValue)
  23. {
  24. return IsNetworkAvailable;
  25. }
  26. return IsLocalNetworkAvailable.Value;
  27. }
  28. }
  29. }