VoteFinishedEventArgs.cs 796 B

123456789101112131415161718192021222324252627282930
  1. using System.Collections.Immutable;
  2. namespace Content.Server.Voting
  3. {
  4. public sealed class VoteFinishedEventArgs : EventArgs
  5. {
  6. /// <summary>
  7. /// Null if stalemate.
  8. /// </summary>
  9. public readonly object? Winner;
  10. /// <summary>
  11. /// Winners. More than one if there was a stalemate.
  12. /// </summary>
  13. public readonly ImmutableArray<object> Winners;
  14. /// <summary>
  15. /// Stores all the votes in a string, for webhooks.
  16. /// </summary>
  17. public readonly List<int> Votes;
  18. public VoteFinishedEventArgs(object? winner, ImmutableArray<object> winners, List<int> votes)
  19. {
  20. Winner = winner;
  21. Winners = winners;
  22. Votes = votes;
  23. }
  24. }
  25. }