SimpleMessageBusGenerator

Generates SimpleMessageBus message classes for entity CRUD operations.

Syntax

public class SimpleMessageBusGenerator : EntityGeneratorBase, IDisposable

Inheritance

Implements

Constructors

SimpleMessageBusGenerator

public SimpleMessageBusGenerator(List<string> extraUsings, string entityNamespace, EntityComposition entity, string messageType)
Initializes a new instance of the class.

Parameters

  • extraUsings List<string>: Additional using statements to include.
  • entityNamespace string: The namespace where the generated messages will be placed.
  • entity EntityComposition: The entity composition metadata.
  • messageType string: The type of message to generate (Base, Created, Updated, Deleted).

Methods

Generate

public override void Generate()
Generates the message class based on the configured message type.

WriteFile

public string WriteFile(string directory = null)
Writes the generated file to the specified directory.

Parameters

  • directory string: The directory to write the file to.

Returns

string The path of the written file.