NotificationOption.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #pragma warning disable CA1819 // Properties should not return arrays
  2. #pragma warning disable CS1591
  3. using System;
  4. namespace MediaBrowser.Model.Notifications
  5. {
  6. public class NotificationOption
  7. {
  8. public NotificationOption(string type)
  9. {
  10. Type = type;
  11. DisabledServices = Array.Empty<string>();
  12. DisabledMonitorUsers = Array.Empty<string>();
  13. SendToUsers = Array.Empty<string>();
  14. }
  15. public NotificationOption()
  16. {
  17. DisabledServices = Array.Empty<string>();
  18. DisabledMonitorUsers = Array.Empty<string>();
  19. SendToUsers = Array.Empty<string>();
  20. }
  21. public string? Type { get; set; }
  22. /// <summary>
  23. /// Gets or sets user Ids to not monitor (it's opt out).
  24. /// </summary>
  25. public string[] DisabledMonitorUsers { get; set; }
  26. /// <summary>
  27. /// Gets or sets user Ids to send to (if SendToUserMode == Custom).
  28. /// </summary>
  29. public string[] SendToUsers { get; set; }
  30. /// <summary>
  31. /// Gets or sets a value indicating whether this <see cref="NotificationOption"/> is enabled.
  32. /// </summary>
  33. /// <value><c>true</c> if enabled; otherwise, <c>false</c>.</value>
  34. public bool Enabled { get; set; }
  35. /// <summary>
  36. /// Gets or sets the disabled services.
  37. /// </summary>
  38. /// <value>The disabled services.</value>
  39. public string[] DisabledServices { get; set; }
  40. /// <summary>
  41. /// Gets or sets the send to user mode.
  42. /// </summary>
  43. /// <value>The send to user mode.</value>
  44. public SendToUserType SendToUserMode { get; set; }
  45. }
  46. }