SubProtocolConfig.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using SuperSocket.Common;
  6. using System.Configuration;
  7. namespace SuperWebSocket.Config
  8. {
  9. /// <summary>
  10. /// SubProtocol configuration
  11. /// </summary>
  12. public class SubProtocolConfig : ConfigurationElementBase
  13. {
  14. /// <summary>
  15. /// Initializes a new instance of the <see cref="SubProtocolConfig"/> class.
  16. /// </summary>
  17. public SubProtocolConfig()
  18. : base(false)
  19. {
  20. }
  21. /// <summary>
  22. /// Gets the type.
  23. /// </summary>
  24. [ConfigurationProperty("type", IsRequired = false)]
  25. public string Type
  26. {
  27. get
  28. {
  29. return (string)this["type"];
  30. }
  31. }
  32. /// <summary>
  33. /// Gets the commands.
  34. /// </summary>
  35. [ConfigurationProperty("commands")]
  36. public CommandConfigCollection Commands
  37. {
  38. get
  39. {
  40. return this["commands"] as CommandConfigCollection;
  41. }
  42. }
  43. }
  44. }