AuthenticationResultEventArgs.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using MediaBrowser.Controller.Authentication;
  3. using MediaBrowser.Model.Dto;
  4. namespace MediaBrowser.Controller.Events.Authentication;
  5. /// <summary>
  6. /// A class representing an authentication result event.
  7. /// </summary>
  8. public class AuthenticationResultEventArgs : EventArgs
  9. {
  10. /// <summary>
  11. /// Initializes a new instance of the <see cref="AuthenticationResultEventArgs"/> class.
  12. /// </summary>
  13. /// <param name="result">The <see cref="AuthenticationResult"/>.</param>
  14. public AuthenticationResultEventArgs(AuthenticationResult result)
  15. {
  16. User = result.User;
  17. SessionInfo = result.SessionInfo;
  18. ServerId = result.ServerId;
  19. }
  20. /// <summary>
  21. /// Gets or sets the user.
  22. /// </summary>
  23. public UserDto User { get; set; }
  24. /// <summary>
  25. /// Gets or sets the session information.
  26. /// </summary>
  27. public SessionInfoDto? SessionInfo { get; set; }
  28. /// <summary>
  29. /// Gets or sets the server id.
  30. /// </summary>
  31. public string? ServerId { get; set; }
  32. }