ServerCollection.cs 972 B

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Configuration;
  4. using System.Text;
  5. using SuperSocket.Common;
  6. using SuperSocket.SocketBase.Config;
  7. namespace SuperSocket.SocketEngine.Configuration
  8. {
  9. /// <summary>
  10. /// Server configuration collection
  11. /// </summary>
  12. [ConfigurationCollection(typeof(Server), AddItemName = "server")]
  13. public class ServerCollection : GenericConfigurationElementCollection<Server, IServerConfig>
  14. {
  15. /// <summary>
  16. /// Adds the new server element.
  17. /// </summary>
  18. /// <param name="newServer">The new server.</param>
  19. public void AddNew(Server newServer)
  20. {
  21. base.BaseAdd(newServer);
  22. }
  23. /// <summary>
  24. /// Removes the specified server from the configuration.
  25. /// </summary>
  26. /// <param name="name">The name.</param>
  27. public void Remove(string name)
  28. {
  29. base.BaseRemove(name);
  30. }
  31. }
  32. }