NLog/NLog — pull request #246 by Slowpython (2013-07-29 19:28:09+00:00)
Title: Additional Layout Renderer "Assembly-Name"

Added a new layout renderer "assembly-name" and the unit test for the new layout renderer. This should replace the current assembly-version layout renderer as this one incorporates the version.

The rendering options should be similar to the exception and processinfo layout renderers.

Configuration Syntax
```
${assembly-name:Format=string:Separator=string:ShowDisplayNames=Boolean:RetrieveMethod=enum}

```

Rendering Options

* **Format**
The format of the output. Must be a comma-separated list of assembly name properties.
These properties may include: Name,Version,Culture,PublicKeyToken. Properties are case-insensitive.
The default for this parameter is: Name, Version.

* **Separator**
Used to concatenate parts specified in the Format.
Defaults to:", " without the quotes

* **ShowDisplayNames**
Used to specify whether the display name for each property should be display in the output.
Defaults to: False
Example: Given the following layout ```${assembly-name:name,version,culture}```
if ShowDisplayNames is true the following will be output:
```Name=Example, Version=1.0.0.0, Culture=en```
if ShowDisplayNames is false the following will be output:
```Example, 1.0.0.0, en```

* **RetrieveMethod**
* _EntryAssembly_ - Use GetEntryAssembly method from System.Reflection.Assembly. This has the effect of retrieving the process executable in the default application domain.
* _ExecutingAssembly_ - Use GetExecutingAssembly method from System.Reflection.Assembly. This has the effect of retrieving the assembly that contains the code that is currently executing.
* _CallingAssembly_ - Use GetCallingAssembly method from System.Reflection.Assembly. This has the effect of retrieving the assembly that invoked the currently executing method.
* _TestAssembly_ - This is only used for testing purposes within the unit tests. This was required due to the unit tests not retrieving a usable assembly resulting in empty output. Currently this is set to create a fake assembly name with the full name as: "ExampleAssembly, Version=1.0.0.0, Culture=en, PublicKeyToken=a5d015c7d5a0b012"
* _EmptyAssembly_ - This will set the assembly name to be null. Used within unit tests to have a controlled test if an assembly was not retrievable.