Skip to content
Concord

Class PatchAttribute

Namespace
Concord
Assembly
Concord.Orchestration.dll

Marks a type as a Concord patch declaration. Only types carrying this attribute are scanned by PatchDeclarationScanner: their InjectAttribute methods become patches and their declared fields become attached properties. A declaration may carry zero InjectAttribute methods (an attached-data-only declaration is valid).

[AttributeUsage(AttributeTargets.Class)]
public sealed class PatchAttribute : Attribute
Inheritance
PatchAttribute
Inherited Members

Constructors

PatchAttribute()

Initializes a new declaration whose target base type is inferred from the declaration type's own base type.

public PatchAttribute()

PatchAttribute(string)

Initializes a new declaration whose target base type is resolved at runtime by full assembly-qualified or namespace-qualified type name. Use this to target internal or inaccessible engine types where typeof(T) cannot be written at the call site.

public PatchAttribute(string targetTypeName)

Parameters

targetTypeName string

The fully-qualified type name to resolve. Resolved first via GetType(string), then by scanning all assemblies in CurrentDomain.

PatchAttribute(Type)

Initializes a new declaration whose target base type is given explicitly. Use this to target a sealed or otherwise non-subclassable target type from a declaration that does not inherit from it.

public PatchAttribute(Type target)

Parameters

target Type

The target type the declaration patches.

Properties

Target

Gets the explicit target base type, or null when inferred from the declaration type's base type.

public Type? Target { get; }

Property Value

Type

TargetTypeName

Gets the fully-qualified name of the target type for late-bound resolution, or null when the target is given as a Type directly or inferred from the base class.

public string? TargetTypeName { get; }

Property Value

string