Add project files.
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
using Sarand.Core.Base;
|
||||
using Sarand.OperationsMgr.Core.App;
|
||||
using Sarand.Win.Dbas.Base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Sarand.OperationsMgr.Service.App
|
||||
{
|
||||
//======================================================================
|
||||
public class OpnServiceApp : SacsStateItem, IDisposable
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
private static OpnServiceApp app;
|
||||
private PropertySet properties;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
public OpnServiceApp (String initialLogMessage)
|
||||
{
|
||||
}
|
||||
public void Dispose ()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public OpnSessionContext SessionContext { get; }
|
||||
public SacsDatabase Database { get; private set; }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// I n s t a n c e
|
||||
//-------------------------------------------------------------------
|
||||
public static OpnServiceApp GetInstance ()
|
||||
{
|
||||
return app;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// G l o b a l s
|
||||
//-------------------------------------------------------------------
|
||||
private void InitGlobals ()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
private void DeinitGlobals ()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// D a t a b a s e
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//======================================================================
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
using Sarand.Core.Base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Sarand.OperationsMgr.Service.App
|
||||
{
|
||||
//=======================================================================
|
||||
public class OpnServiceConfig
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
public class ProcessSchedule
|
||||
{
|
||||
public int TimerMins { get; set; } = 0;
|
||||
public String TimeFrom { get; set; } = "";
|
||||
public String TimeTo { get; set; } = "";
|
||||
}
|
||||
public enum WebServiceType { Internal = 10, External = 20 };
|
||||
public class WebService
|
||||
{
|
||||
public WebService (WebServiceType type)
|
||||
{
|
||||
this.ServiceType = type;
|
||||
}
|
||||
public WebServiceType ServiceType { get; }
|
||||
public bool Enabled { get; set; }
|
||||
public int HttpListenerPort { get; set; } = 0;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
private static readonly String logTab = " ";
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Load configuration.
|
||||
public void LoadFromProperties (PropertySet properties)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
private void ConfigureWebService (WebService webService, PropertySet properties)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using Sarand.OperationsMgr.Core.App;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Sarand.OperationsMgr.Service.App
|
||||
{
|
||||
//=======================================================================
|
||||
class OpnSessionContext_Service : OpnSessionContext
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
public OpnSessionContext_Service (ushort sessionContentIndex) :
|
||||
base(sessionContentIndex)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using Sarand.Core.Base;
|
||||
using Sarand.OperationsMgr.Win.Dbas.App;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Sarand.OperationsMgr.Service.App
|
||||
{
|
||||
//=======================================================================
|
||||
public class OpnSystem_Service : OpnSystem_WinDbas
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
public OpnSystem_Service (PropertySet properties) :
|
||||
base(properties)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.ServiceProcess;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Sarand.OperationsMgr.Service.App
|
||||
{
|
||||
//=======================================================================
|
||||
static class Program
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
/// <summary>Service entry point</summary>
|
||||
static void Main ()
|
||||
{
|
||||
ServiceBase[] ServicesToRun;
|
||||
ServicesToRun = new ServiceBase[]
|
||||
{
|
||||
new SaOperationsMgrService()
|
||||
};
|
||||
ServiceBase.Run(ServicesToRun);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
namespace Sarand.OperationsMgr.Service.App
|
||||
{
|
||||
partial class SaOperationsMgrService
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent ()
|
||||
{
|
||||
components = new System.ComponentModel.Container();
|
||||
this.ServiceName = "Service1";
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.ServiceProcess;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Sarand.OperationsMgr.Service.App
|
||||
{
|
||||
public partial class SaOperationsMgrService : ServiceBase
|
||||
{
|
||||
public SaOperationsMgrService ()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override void OnStart (string[] args)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnStop ()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user