66 lines
1.7 KiB
C#
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();
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
}
|