AssemblyBuilder Class
The AssemblyBuilder class uses a fluent model to build the assembly for the testbed. It allows you to specify which modules to include, configure their points, and add contexts for testing. You will interact with an instance of this class in the ConfigureAssembly method of the Program class to set up your testbed for execution.
Definition
Namespace: GHost.GSharp.Developer.Builder
Assembly: GHost.GSharp.Developer.dll
public class AssemblyBuilder
Methods
| Method | Description |
|---|---|
AddModule | The method to add a module to the testbed assembly. |
RunAsAt | Configures the assembly to run in "as at" mode, which simulates running the module at a specific point in time. |
UsingLogLayoutFormat | Configures a custom log layout format for testbed logs. |
UsingFullLogLayoutFormat | Configures the testbed to use a full log layout format that includes more than the standard testbed log contains. |
WithMinimumAssemblyLogLevel | Configures the minimum log level for the assembly when running in the testbed. |
Example
private void ConfigureAssembly(AssemblyBuilder builder)
{
builder
.UsingFullLogLayoutFormat()
.WithMinimumAssemblyLogLevel(LogLevel.Info)
.AddModule<TankVolume>(
// ... configure points and contexts here
)
.RunAsAt("13-Feb-2025 14:30:00");
}