public void Stop(
bool clearQueues = false,
bool clearBroatcasts = false,
bool resetQueueFilters = false
)
Public Sub Stop (
Optional clearQueues As Boolean = false,
Optional clearBroatcasts As Boolean = false,
Optional resetQueueFilters As Boolean = false
)
public:
void Stop(
bool clearQueues = false,
bool clearBroatcasts = false,
bool resetQueueFilters = false
)
The following example shows the activation and deactivation of a Worker object.
In case of failure, an error messages is written to the console output using English as output language.
// Create the object using the default configuration
//
Worker myWorker = new Worker();
try
{
// Activate the worker object
//
myWorker.Start();
Console.WriteLine("The Worker object was activated successfully.");
// Deactivate the worker object, when it is no longer needed
//
myWorker.Stop();
Console.WriteLine("The Worker object was deactivated.");
}
catch(Exception ex)
{
Console.WriteLine($"An exception occurred by activating the Worker object. {ex.Message}");
}
' Create the object using the default configuration
'
Dim myWorker As Worker = New Worker()
Try
' Activate the worker object
'
myWorker.Start()
Console.WriteLine("The Worker object was activated successfully.")
' Deactivate the worker object, when it is no longer needed
'
myWorker.Stop()
Console.WriteLine("The Worker object was deactivated.")
Catch ex As Exception
Console.WriteLine($"An exception occurred by activating the Worker object. {ex.Message}")
End Try
// Create the object using the default configuration
//
Worker^ myWorker = gcnew Worker();
try
{
// Activate the worker object
//
myWorker->Start(false, false, false);
Console::WriteLine("The Worker object was activated successfully.");
// Deactivate the worker object, when it is no longer needed
//
myWorker->Stop(false, false, false);
Console::WriteLine("The Worker object was deactivated.");
}
catch(Exception^ ex)
{
Console::WriteLine("An exception occurred by activating the Worker object. {0}", ex->Message);
}