Declares a custom type converter.
Namespace:
MbUnit.FrameworkAssembly: MbUnit (in MbUnit.dll) Version: 3.2.0.0 (3.2.528.0)
Syntax
| C# |
|---|
public class ConverterAttribute : ExtensionPointPatternAttribute |
| Visual Basic (Declaration) |
|---|
Public Class ConverterAttribute _ Inherits ExtensionPointPatternAttribute |
Remarks
That attribute must be used on a static method taking one single parameter of the source type, and returning a value of the target type.
Examples
public class MyConverters { [Converter] public static Pen KnownColorToPen(KnownColor knownColor) { return new Pen(Color.FromKnownColor(knownColor)); } }
Inheritance Hierarchy
System..::.Object
System..::.Attribute
Gallio.Framework.Pattern..::.PatternAttribute
Gallio.Framework.Pattern..::.DecoratorPatternAttribute
MbUnit.Framework..::.ExtensionPointPatternAttribute
MbUnit.Framework..::.ConverterAttribute
System..::.Attribute
Gallio.Framework.Pattern..::.PatternAttribute
Gallio.Framework.Pattern..::.DecoratorPatternAttribute
MbUnit.Framework..::.ExtensionPointPatternAttribute
MbUnit.Framework..::.ConverterAttribute
