This property check if the generator must stop.
Namespace:
LeCouteauSuisse.APIAssembly: LeCouteauSuisseAPI (in LeCouteauSuisseAPI.dll) Version: 1.0.0.2 (1.0.0.2)
Syntax
C# |
---|
public virtual bool MustStop { get; } |
Visual Basic (Declaration) |
---|
Public Overridable ReadOnly Property MustStop As Boolean |
Visual C++ |
---|
public: virtual property bool MustStop { bool get (); } |
Field Value
true if the service is stopping; false if the service is running.
Examples
See this sample to add inside Run()()() method the to check the stop flag in your code :
CopyC#

while (!MustStop) // exit the loop on stopping { try { if (WaitStop(delay)) // wait, but exit the loop on stopping break; } catch (Exception ex) { context.Logger.Write(LoggerLevel.Error, "Generator " + context.Name + " error while waiting", ex); } // Put here your business code to send an event // eventArgs = (GeneratorEvent)context.GetNewGeneratorEvent(typeof(GeneratorEvent)); // base.OnNewEvent(eventArgs); }