Skip to main content

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​

MethodDescription
AddModuleThe method to add a module to the testbed assembly.
RunAsAtConfigures the assembly to run in "as at" mode, which simulates running the module at a specific point in time.
UsingLogLayoutFormatConfigures a custom log layout format for testbed logs.
UsingFullLogLayoutFormatConfigures the testbed to use a full log layout format that includes more than the standard testbed log contains.
WithMinimumAssemblyLogLevelConfigures 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");
}