PeanutButter
Loading...
Searching...
No Matches
PeanutButter.DuckTyping.Extensions.CustomAttributeHelperExtensions Class Reference

Contains an extension method to craete a CustomAttributeBuilder out of CustomAttributeData, largely based on code at: http://stackoverflow.com/questions/2365470/using-reflection-emit-to-copy-a-custom-attribute-to-another-method (apparently, this is how AutoFac does it!) More...

Static Public Member Functions

static CustomAttributeBuilder ToAttributeBuilder (this CustomAttributeData data)
 Creates a CustomAttributeBuilder from the provided CustomAttributeData.

Detailed Description

Contains an extension method to craete a CustomAttributeBuilder out of CustomAttributeData, largely based on code at: http://stackoverflow.com/questions/2365470/using-reflection-emit-to-copy-a-custom-attribute-to-another-method (apparently, this is how AutoFac does it!)

Member Function Documentation

◆ ToAttributeBuilder()

CustomAttributeBuilder PeanutButter.DuckTyping.Extensions.CustomAttributeHelperExtensions.ToAttributeBuilder ( this CustomAttributeData data)
static

Creates a CustomAttributeBuilder from the provided CustomAttributeData.

Parameters
dataData to use to create the CustomAttributeBuilder
Returns
A CustomAttributeBuilder created from the input data
Exceptions
ArgumentNullExceptionThrown if the provided CustomAttributeData is null

The documentation for this class was generated from the following file:
  • source/Utils/PeanutButter.DuckTyping/Extensions/CustomAttributeHelperExtensions.cs