MethodStubs.cs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Collections.ObjectModel;
  5. using System.Configuration;
  6. using System.ServiceModel;
  7. using System.ServiceModel.Channels;
  8. using System.ServiceModel.Description;
  9. using System.Xml;
  10. using ConfigurationType = System.Configuration.Configuration;
  11. namespace System.ServiceModel.Configuration
  12. {
  13. // ChannelEndpointElementCollection
  14. public sealed partial class ChannelEndpointElementCollection
  15. : ServiceModelEnhancedConfigurationElementCollection<ChannelEndpointElement>
  16. {
  17. protected override object GetElementKey (ConfigurationElement element)
  18. {
  19. ChannelEndpointElement el = (ChannelEndpointElement) element;
  20. return el.Name + ";" + el.Contract;
  21. }
  22. }
  23. // ClaimTypeElementCollection
  24. public sealed partial class ClaimTypeElementCollection
  25. : ServiceModelConfigurationElementCollection<ClaimTypeElement>, ICollection, IEnumerable
  26. {
  27. protected override object GetElementKey (ConfigurationElement element)
  28. {
  29. return ((ClaimTypeElement) element).ClaimType;
  30. }
  31. }
  32. // ComContractElementCollection
  33. public sealed partial class ComContractElementCollection
  34. : ServiceModelEnhancedConfigurationElementCollection<ComContractElement>
  35. {
  36. protected override object GetElementKey (ConfigurationElement element)
  37. {
  38. return ((ComContractElement) element).Name;
  39. }
  40. }
  41. // ComMethodElementCollection
  42. public sealed partial class ComMethodElementCollection
  43. : ServiceModelEnhancedConfigurationElementCollection<ComMethodElement>
  44. {
  45. protected override object GetElementKey (ConfigurationElement element)
  46. {
  47. return ((ComMethodElement) element).ExposedMethod;
  48. }
  49. }
  50. // ComPersistableTypeElementCollection
  51. public sealed partial class ComPersistableTypeElementCollection
  52. : ServiceModelEnhancedConfigurationElementCollection<ComPersistableTypeElement>
  53. {
  54. protected override object GetElementKey (ConfigurationElement element)
  55. {
  56. // FIXME: ID? anyways, cosmetic COM stuff...
  57. return ((ComPersistableTypeElement) element).Name;
  58. }
  59. }
  60. // ComUdtElementCollection
  61. public sealed partial class ComUdtElementCollection
  62. : ServiceModelEnhancedConfigurationElementCollection<ComUdtElement>
  63. {
  64. protected override object GetElementKey (ConfigurationElement element)
  65. {
  66. // FIXME: another property? anyways COM stuff...
  67. return ((ComUdtElement) element).Name;
  68. }
  69. }
  70. // CustomBindingElementCollection
  71. public sealed partial class CustomBindingElementCollection
  72. : ServiceModelEnhancedConfigurationElementCollection<CustomBindingElement>, ICollection, IEnumerable
  73. {
  74. protected override object GetElementKey (ConfigurationElement element)
  75. {
  76. return ((CustomBindingElement) element).Name;
  77. }
  78. }
  79. // IssuedTokenClientBehaviorsElementCollection
  80. public sealed partial class IssuedTokenClientBehaviorsElementCollection
  81. : ServiceModelConfigurationElementCollection<IssuedTokenClientBehaviorsElement>
  82. {
  83. [MonoTODO]
  84. protected override object GetElementKey (ConfigurationElement element)
  85. {
  86. throw new NotImplementedException ();
  87. }
  88. }
  89. // StandardBindingElementCollection
  90. public sealed partial class StandardBindingElementCollection<TBindingConfiguration>
  91. : ServiceModelEnhancedConfigurationElementCollection<TBindingConfiguration>, ICollection, IEnumerable
  92. where TBindingConfiguration : StandardBindingElement, new()
  93. {
  94. protected override object GetElementKey (ConfigurationElement element)
  95. {
  96. return ((StandardBindingElement) element).Name;
  97. }
  98. }
  99. // TransportConfigurationTypeElementCollection
  100. public sealed partial class TransportConfigurationTypeElementCollection
  101. : ServiceModelConfigurationElementCollection<TransportConfigurationTypeElement>
  102. {
  103. protected override object GetElementKey (ConfigurationElement element)
  104. {
  105. return ((TransportConfigurationTypeElement) element).Name;
  106. }
  107. }
  108. // XPathMessageFilterElementCollection
  109. public sealed partial class XPathMessageFilterElementCollection
  110. : ServiceModelConfigurationElementCollection<XPathMessageFilterElement>
  111. {
  112. [MonoTODO]
  113. protected override object GetElementKey (ConfigurationElement element)
  114. {
  115. throw new NotImplementedException ();
  116. }
  117. }
  118. }