Class ConvertWithAttribute
- Namespace
- ForgeMap
- Assembly
- ForgeMap.Abstractions.dll
Uses a custom converter class for the forging. Available in ForgeMap v1.1+.
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public sealed class ConvertWithAttribute : Attribute
- Inheritance
-
objectAttributeConvertWithAttribute
Constructors
ConvertWithAttribute(string)
Creates a new ConvertWithAttribute with a member reference.
public ConvertWithAttribute(string memberName)
Parameters
memberNamestringThe name of a field or property on the forger class whose type implements ITypeConverter<TSource, TDestination>.
ConvertWithAttribute(Type)
Creates a new ConvertWithAttribute with a converter type.
public ConvertWithAttribute(Type converterType)
Parameters
converterTypeTypeThe type of the converter class. Must implement ITypeConverter<TSource, TDestination>.
Properties
ConverterType
Gets the type of the converter class, or null if a member reference is used.
public Type? ConverterType { get; }
Property Value
- Type
MemberName
Gets the name of the field or property on the forger class, or null if a type reference is used.
public string? MemberName { get; }
Property Value
- string