XmlFormatExtensionAttribute.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. //
  2. // System.Web.Services.Configuration.XmlFormatExtensionAttribute.cs
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. //
  7. // Copyright (C) Tim Coleman, 2002
  8. //
  9. namespace System.Web.Services.Configuration {
  10. [AttributeUsage (AttributeTargets.Class)]
  11. public sealed class XmlFormatExtensionAttribute : Attribute {
  12. #region Fields
  13. string elementName;
  14. string ns;
  15. Type[] extensionPoints;
  16. #endregion // Fields
  17. #region Constructors
  18. public XmlFormatExtensionAttribute ()
  19. {
  20. }
  21. public XmlFormatExtensionAttribute (string elementName, string ns, Type extensionPoint1)
  22. : this (elementName, ns, new Type[1] {extensionPoint1})
  23. {
  24. }
  25. public XmlFormatExtensionAttribute (string elementName, string ns, Type[] extensionPoints)
  26. : this ()
  27. {
  28. this.elementName = elementName;
  29. this.ns = ns;
  30. this.extensionPoints = extensionPoints;
  31. }
  32. public XmlFormatExtensionAttribute (string elementName, string ns, Type extensionPoint1, Type extensionPoint2)
  33. : this (elementName, ns, new Type[2] {extensionPoint1, extensionPoint2})
  34. {
  35. }
  36. public XmlFormatExtensionAttribute (string elementName, string ns, Type extensionPoint1, Type extensionPoint2, Type extensionPoint3)
  37. : this (elementName, ns, new Type[3] {extensionPoint1, extensionPoint2, extensionPoint3})
  38. {
  39. }
  40. public XmlFormatExtensionAttribute (string elementName, string ns, Type extensionPoint1, Type extensionPoint2, Type extensionPoint3, Type extensionPoint4)
  41. : this (elementName, ns, new Type[4] {extensionPoint1, extensionPoint2, extensionPoint3, extensionPoint4})
  42. {
  43. }
  44. #endregion // Constructors
  45. #region Properties
  46. public string ElementName {
  47. get { return elementName; }
  48. set { elementName = value; }
  49. }
  50. public Type[] ExtensionPoints {
  51. get { return extensionPoints; }
  52. set { extensionPoints = value; }
  53. }
  54. public string Namespace {
  55. get { return ns; }
  56. set { ns = value; }
  57. }
  58. #endregion // Properties
  59. }
  60. }