ExtensionAttribute.xml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Type Name="ExtensionAttribute" FullName="System.Runtime.CompilerServices.ExtensionAttribute">
  3. <TypeSignature Language="C#" Value="public sealed class ExtensionAttribute : Attribute" />
  4. <AssemblyInfo>
  5. <AssemblyName>System.Core</AssemblyName>
  6. <AssemblyVersion>3.5.0.0</AssemblyVersion>
  7. </AssemblyInfo>
  8. <Base>
  9. <BaseTypeName>System.Attribute</BaseTypeName>
  10. </Base>
  11. <Interfaces />
  12. <Attributes>
  13. <Attribute>
  14. <AttributeName>System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method)</AttributeName>
  15. </Attribute>
  16. </Attributes>
  17. <Docs>
  18. <remarks>
  19. <attribution license="cc4" from="Microsoft" modified="false" />
  20. <para>In Visual Basic, you should use this attribute to create an extension method. For more information, see <format type="text/html"><a href="b8020aae-374d-46a9-bcb7-8cc2390b93b6">Extension Methods (Visual Basic)</a></format>.</para>
  21. <para>In C#, you do not need to use this attribute; you should use the <format type="text/html"><a href="d4f827fe-4710-410b-89b8-867dad44b8a3">this (C# Reference)</a></format> modifier for the first parameter to create an extension method. The compiler automatically emits ExtensionAttribute for extension methods. For more information, see <format type="text/html"><a href="175ce3ff-9bbf-4e64-8421-faeb81a0bb51">Extension Methods (C# Programming Guide)</a></format>.</para>
  22. <para>If you are writing a compiler that supports extension methods, your compiler should emit this attribute on each extension method and on each class and assembly that contains one or more extension methods.</para>
  23. </remarks>
  24. <summary>
  25. <attribution license="cc4" from="Microsoft" modified="false" />
  26. <para>Indicates that a method is an extension method, or that a class or assembly contains extension methods.</para>
  27. </summary>
  28. </Docs>
  29. <Members>
  30. <Member MemberName=".ctor">
  31. <MemberSignature Language="C#" Value="public ExtensionAttribute ();" />
  32. <MemberType>Constructor</MemberType>
  33. <AssemblyInfo>
  34. <AssemblyVersion>3.5.0.0</AssemblyVersion>
  35. </AssemblyInfo>
  36. <Parameters />
  37. <Docs>
  38. <remarks>To be added.</remarks>
  39. <summary>
  40. <attribution license="cc4" from="Microsoft" modified="false" />
  41. <para>Initializes a new instance of the <see cref="T:System.Runtime.CompilerServices.ExtensionAttribute" /> class. </para>
  42. </summary>
  43. </Docs>
  44. </Member>
  45. </Members>
  46. </Type>