Plugin-side implementation

CgiRemoteControl.exe is the execution trigger that starts plugin processing from the command line; the actual processing is implemented and executed on the plugin side. Therefore, on the plugin side, implement the IEventListener interface to handle events.

This design ensures that when the --PlugInControl argument is specified, the plugin is invoked correctly.

See the Sample Implementation Guide for step-by-step instructions and the complete source code.

Implementation Example:
public class SamplePlugin : IEventListener
{
    // Subscribe to specific events by implementing this property
    public virtual EventId EventsToSubscribe
    {
        get { return EventId.PluginControlCommand; }
    }

    // Implement the OnPluginControl method to handle the plugin command
    public int OnPluginControl(string command)
    {
        //this.LoggerSvc.Info(DateTime.Now + ":test log start"); // Info: 1/17/2025 11:13:01 AM:test log start
        //Console.WriteLine($"Received command: {command}");     // Received command: BuildHost 4711
        // Perform actions based on the command
        return 0; // Return an appropriate status code
    }
}


Revision #2
Created 2025-10-30 05:00:39 UTC by Tsuyoshi.Kato
Updated 2025-12-10 00:09:45 UTC by Tsuyoshi.Kato