NLog Logging Library

TargetFactory.AddTargetsFromAssembly Method 

[This is preliminary documentation and subject to change.]

Scans the specified assembly for types marked with TargetAttribute and adds them to the factory. Optionally it prepends the specified text to the target names to avoid naming collisions.

[Visual Basic]
Public Shared Sub AddTargetsFromAssembly( _
   ByVal theAssembly As Assembly, _
   ByVal prefix As String _
)
[C#]
public static void AddTargetsFromAssembly(
   Assembly theAssembly,
   string prefix
);

Parameters

theAssembly
The assembly to be scanned for targets.
prefix
The prefix to be prepended to target names.

See Also

TargetFactory Class | NLog Namespace