You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

Group.cs 1.3 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Text.Json.Serialization;
  5. namespace Shadowsocks.Models
  6. {
  7. public class Group : IGroup<Server>
  8. {
  9. /// <summary>
  10. /// Gets or sets the group name.
  11. /// </summary>
  12. public string Name { get; set; }
  13. /// <summary>
  14. /// Gets or sets the UUID of the group.
  15. /// </summary>
  16. public Guid Id { get; set; }
  17. /// <inheritdoc/>
  18. public int Version { get; set; }
  19. /// <inheritdoc/>
  20. public List<Server> Servers { get; set; }
  21. /// <summary>
  22. /// Gets or sets the data usage in bytes.
  23. /// The value is fetched from SIP008 provider.
  24. /// </summary>
  25. public ulong BytesUsed { get; set; }
  26. /// <summary>
  27. /// Gets or sets the data remaining to be used in bytes.
  28. /// The value is fetched from SIP008 provider.
  29. /// </summary>
  30. public ulong BytesRemaining { get; set; }
  31. public Group() : this(string.Empty)
  32. { }
  33. public Group(string name)
  34. {
  35. Name = name;
  36. Id = new Guid();
  37. Version = 1;
  38. BytesUsed = 0UL;
  39. BytesRemaining = 0UL;
  40. Servers = new List<Server>();
  41. }
  42. }
  43. }