4.8. Custom Attributes for CLR Routines
The .NET
CLR is extended using attributesdescriptive keywords saved in the assembly metadata that provide additional information for programming constructs. The custom attributes
used with SQL Server 2005 CLR routines are defined in the Microsoft.SqlServer.Server namespace. Table 4-15 describes custom attributes used with SQL Server CLR routines.
Table 4-15. Custom attributes for CLR routinesAttribute | CLR routine | Description |
---|
SqlFacet | UDT | Specifies details about the return type of a UDT. | SqlFunction | UDF | Indicates that the method should be registered as a UDF. | SqlMethod | UDT | Specifies the determinism and data access properties of methods in a UDT. | SqlProcedure | Stored procedure | Indicates that the method should be registered as a stored procedure. | SqlTrigger | Trigger | Indicates that the method should be registered as a trigger. | SqlUserDefinedAggregate | UDA | Indicates that the method should be registered as a UDA. | SqlUserDefinedType | UDT | Indicates that the class or structure should be registered as a UDT. |
These attributes are discussed in detail in Chapter 5 in the specific sections about the .NET Framework routines that use them.
 |