Files
Common-VS2019/SacsStandardProc/Proc/Procs/SaProcess.cs
T
2021-07-08 20:51:25 +01:00

66 lines
1.7 KiB
C#

using Sarand.Net.Standard.Base.Procs;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
namespace Sarand.Net.Standard.Proc.Procs
{
//=======================================================================
public abstract class SaProcess : SaProcess_Base
{
//-------------------------------------------------------------------
// Definitions.
public new class Config : SaProcess_Base.Config
{
protected Config() : base()
{ }
}
//-------------------------------------------------------------------
// Data members.
private Config config;
//-------------------------------------------------------------------
// Construction.
protected SaProcess(Config config) :
base(config)
{
this.config = config;
}
protected override void Dispose(bool disposing)
{
if (disposing)
{
}
base.Dispose(disposing);
}
//-------------------------------------------------------------------
// Properties.
//-------------------------------------------------------------------
// Utilities.
//-------------------------------------------------------------------
//-------------------------------------------------------------------
// Run asynchronous.
//-------------------------------------------------------------------
public bool RunAsync()
{
// Run on separate thread.
Thread thread = new Thread(new ThreadStart(RunOnThread));
thread.IsBackground = true;
thread.Start();
return true;
}
private void RunOnThread()
{
RunProcess();
}
//-------------------------------------------------------------------
}
//=======================================================================
}