Table of Contents

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
object
Attribute
ConvertWithAttribute

Constructors

ConvertWithAttribute(string)

Creates a new ConvertWithAttribute with a member reference.

public ConvertWithAttribute(string memberName)

Parameters

memberName string

The 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

converterType Type

The 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