Add project files.

This commit is contained in:
Thomas Savine
2020-03-06 16:07:06 +00:00
parent e7b186c7e3
commit 70de9715ce
300 changed files with 43679 additions and 0 deletions
@@ -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 ()
{
}
}
}
@@ -0,0 +1,28 @@
using Sarand.OperationsMgr.App.Consoles;
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.Consoles
{
//=======================================================================
public class OpnCodeTypeConsole_Service : OpnCodeTypeConsole_Dbas
{
//-------------------------------------------------------------------
// Construction.
public OpnCodeTypeConsole_Service (SacsDatabase database) :
base(database)
{
}
//-------------------------------------------------------------------
// Method to display Code Types dialog.
protected override MaintainCodeTypesFunction MaintainCodeTypesFn { get { return null; } }
//-------------------------------------------------------------------
}
//=======================================================================
}
@@ -0,0 +1,85 @@
using Sarand.Core.Base;
using Sarand.Core.Bus;
using Sarand.Core.Dbas.Base;
using Sarand.Core.Interfaces;
using Sarand.Core.ItemOptions;
using Sarand.OperationsMgr.App.Consoles;
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.Consoles
{
//=======================================================================
public class OpnInterfaceConsole_Service : OpnInterfaceConsole_Dbas
{
//-------------------------------------------------------------------
// Data members.
//-------------------------------------------------------------------
// Construction.
public OpnInterfaceConsole_Service (OpnUserContext userContext, SacsDatabase database) :
base(userContext)
{
Database = database;
}
//-------------------------------------------------------------------
// Properties.
internal SacsDatabase Database { get; }
//-------------------------------------------------------------------
// Method to display Interface management form.
protected override MaintainInterfacesFunction MaintainInterfacesFn { get { return null; } }
//---------------------------------------------------------------
// Interface item option definitions.
public override List<SaItemOptionDfn> GetInterfaceItemOptionDfns (SaInterfaceCategory interfaceCategory, short interfaceType)
{
throw new NotImplementedException();
}
public override List<SaItemOptionDfn> GetInterfaceItemOptionDfns (SysId interfaceId)
{
throw new NotImplementedException();
}
//-------------------------------------------------------------------
// I n t e r f a c e A c c e s s C o n t r o l
//-------------------------------------------------------------------
//---------------------------------------------------------------
// P r o c e s s i n g O p t i o n s
//---------------------------------------------------------------
//---------------------------------------------------------------
// P r o c e s s I n t e r f a c e
//---------------------------------------------------------------
/// <summary>Interface can only be 'processed' if it defines processing options.</summary>
public override bool CanProcessInterface (SaInterface interfaceObj)
{
throw new NotImplementedException();
}
/// <summary>Popup form to select options for processing interface.</summary>
public override bool ProcessInterface (SaInterface interfaceObj, DbUpdateInfo dbUpdateInfo)
{
throw new NotImplementedException();
}
public override bool AreMultipleInterfaceInstancesAllowed (string context, SaInterfaceCategory interfaceCategory, short interfaceType)
{
throw new NotImplementedException();
}
public override bool AreMultipleActiveInterfacesAllowed (string context, SaInterfaceCategory interfaceCategory)
{
throw new NotImplementedException();
}
//-------------------------------------------------------------------
}
//=======================================================================
}
@@ -0,0 +1,29 @@
using Sarand.OperationsMgr.App.Consoles;
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.Consoles
{
//=======================================================================
public class OpnItemOptionConsole_Service : OpnItemOptionConsole_Dbas
{
//-------------------------------------------------------------------
// Construction.
public OpnItemOptionConsole_Service (OpnUserContext userContext, SacsDatabase database) :
base(database)
{
}
//-------------------------------------------------------------------
// Method to display Security management dialog.
protected override ShowItemOptionsDialogFunction ShowItemOptionsDialogFn { get { return null; } }
//-------------------------------------------------------------------
}
//=======================================================================
}
@@ -0,0 +1,29 @@
using Sarand.OperationsMgr.App.Consoles;
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.Consoles
{
//=======================================================================
public class OpnReferenceDataConsole_Service : OpnReferenceDataConsole_Dbas
{
//-------------------------------------------------------------------
// Construction.
public OpnReferenceDataConsole_Service (OpnUserContext userContext, SacsDatabase database) :
base(userContext, database)
{
}
//-------------------------------------------------------------------
// Method to display Reference Data Maintenance form.
protected override MaintainReferenceDataFunction MaintainReferenceDataFn { get { return null; } }
//-------------------------------------------------------------------
}
//=======================================================================
}
@@ -0,0 +1,59 @@
using Sarand.Core.Bus;
using Sarand.OperationsMgr.App.Consoles;
using Sarand.OperationsMgr.Core.App;
using Sarand.Win.Dbas.Base;
using Sarand.Win.Dbas.Security;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sarand.OperationsMgr.Service.Consoles
{
//=======================================================================
public class OpnSecurityConsole_Service : OpnSecurityConsole_Dbas
{
//-------------------------------------------------------------------
// Data members.
//-------------------------------------------------------------------
// Construction.
public OpnSecurityConsole_Service(OpnSessionContext sessionContext, SacsDatabase database) :
base(database)
{
}
//-------------------------------------------------------------------
// Security events.
protected override bool OnLogin (SysId userId)
{
throw new NotImplementedException();
}
protected override void OnLogout ()
{
throw new NotImplementedException();
}
//-------------------------------------------------------------------
// Method to show User Login form.
protected override ShowUserLoginFormFunction ShowUserLoginFormFn => throw new NotImplementedException();
//-------------------------------------------------------------------
// Method to display Security management form.
protected override ShowManageSecurityDialogFunction ShowManageSecurityDialogFn => throw new NotImplementedException();
//-------------------------------------------------------------------
public override bool OnUserModified (SysId userId)
{
throw new NotImplementedException();
}
public override bool OnSecurityGroupModified (SysId userId)
{
throw new NotImplementedException();
}
//-------------------------------------------------------------------
}
//=======================================================================
}
@@ -0,0 +1,31 @@
using Sarand.OperationsMgr.App.Consoles;
using Sarand.OperationsMgr.Core.App;
using Sarand.Win.Dbas.Base;
using Sarand.Win.Dbas.UpdateLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sarand.OperationsMgr.Service.Consoles
{
//=======================================================================
public class OpnUpdateLogConsole_Service : OpnUpdateLogConsole_Dbas
{
//-------------------------------------------------------------------
// Construction.
public OpnUpdateLogConsole_Service(OpnUserContext userContext, SacsDatabase database) :
base(database)
{
}
//-------------------------------------------------------------------
// Method to display Security management dialog.
protected override ShowUpdateLogDialogFunction ShowUpdateLogDialogFn => throw new NotImplementedException();
//-------------------------------------------------------------------
}
//=======================================================================
}
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace Sarand.OperationsMgr.Service.Data
{
//=======================================================================
public class OpnHttpRequestData
{
//-------------------------------------------------------------------
// Construction.
public OpnHttpRequestData (long instanceId, HttpListenerRequest request)
{
}
//-------------------------------------------------------------------
// Properties.
//-------------------------------------------------------------------
}
//=======================================================================
}
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace Sarand.OperationsMgr.Service.Data
{
//=======================================================================
public class OpnHttpResponseData
{
//-------------------------------------------------------------------
// Properties.
//-------------------------------------------------------------------
// Utilities.
public void Reset ()
{
}
public void SetStatus (HttpStatusCode httpStatus, String description = "")
{
}
//-------------------------------------------------------------------
}
//=======================================================================
}
@@ -0,0 +1,67 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sarand.OperationsMgr.Service.Data
{
//=======================================================================
public class OpnRequestConfigData
{
//-------------------------------------------------------------------
// Definitions.
public class ContextData
{
}
public class FilterData
{
}
public class SortColumnData
{
}
public class ListData
{
}
//-------------------------------------------------------------------
// Properties.
//-------------------------------------------------------------------
// F i l t e r
//-------------------------------------------------------------------
//-------------------------------------------------------------------
// Filter SysId lists.
//-------------------------------------------------------------------
// Filter StatusCat.
//-------------------------------------------------------------------
// Filter Results paging.
//-------------------------------------------------------------------
// I t e m C o l u m n s
//-------------------------------------------------------------------
//-------------------------------------------------------------------
// S o r t C o l u m n s
//-------------------------------------------------------------------
//-------------------------------------------------------------------
}
//=======================================================================
/// <summary>
/// Sort Column list extensions methods.
/// </summary>
public static class SortColumnList
{
/// <summary>
/// Convert each sort column to its string representation: [ColumnName] [ASC|DESC]
/// </summary>
public static List<String> GetSortColumns ()
{
return null;
}
}
//=======================================================================
}
@@ -0,0 +1,50 @@
using Sarand.Core.Base;
using Sarand.OperationsMgr.Core.App;
using Sarand.Win.Office.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sarand.OperationsMgr.Service.Data
{
//=======================================================================
public class OpnWebServiceData : SacsDisposable
{
//-------------------------------------------------------------------
// Data members.
private SaMsXmlDocument requestDoc = null;
private SaMsXmlDocument responseDataDoc = null;
//-------------------------------------------------------------------
// Construction.
public OpnWebServiceData (OpnSessionContext sessionContext)
{
SessionContext = sessionContext;
}
protected override void Dispose (bool disposing)
{
if (disposing)
{
if (requestDoc != null) requestDoc.Dispose();
if (responseDataDoc != null) responseDataDoc.Dispose();
}
}
//-------------------------------------------------------------------
// Properties.
public OpnSessionContext SessionContext { get; }
//-------------------------------------------------------------------
// R e s p o n s e D o c
//-------------------------------------------------------------------
//-------------------------------------------------------------------
// M e s s a g e s
//-------------------------------------------------------------------
//-------------------------------------------------------------------
}
//=======================================================================
}
@@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace Sarand.OperationsMgr.Service.Handlers
{
//=======================================================================
// Ref. http://stackoverflow.com/questions/5895063/asynchronous-httplistener-problem-each-request-is-received-twice
//=======================================================================
public class HttpListenerCallbackState
{
public HttpListenerCallbackState (HttpListener listener)
{
}
}
//=======================================================================
public class OpnHttpRequestHandler
{
//-------------------------------------------------------------------
// Data members.
//-------------------------------------------------------------------
// Configure the listener.
//-------------------------------------------------------------------
// Start the listener.
public void ListenAsynchronously ()
{
}
//-------------------------------------------------------------------
// Stop the listener.
public void StopListening ()
{
}
//-------------------------------------------------------------------
private void Listen (object state)
{
}
//-------------------------------------------------------------------
// L i s t e n e r E v e n t s
//-------------------------------------------------------------------
private void ListenerCallback (IAsyncResult ar)
{
}
private void HandleHttpRequest (HttpListenerContext context, long requestNumber)
{
}
//-------------------------------------------------------------------
/// <summary>Intercept requests for static resources and respond with 'Not Found'.</summary>
private bool IsStaticResourceUnavailable (HttpListenerRequest request)
{
return false;
}
//-------------------------------------------------------------------
}
//=======================================================================
}
@@ -0,0 +1,50 @@
using Sarand.OperationsMgr.Service.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace Sarand.OperationsMgr.Service.Handlers
{
//=======================================================================
public class OpnWebServiceRequestHandler
{
//-------------------------------------------------------------------
// Definitions.
//-------------------------------------------------------------------
// Data members.
//-------------------------------------------------------------------
// Construction.
public OpnWebServiceRequestHandler ()
{
}
//-------------------------------------------------------------------
// Properties.
//-------------------------------------------------------------------
// Utilities.
//-------------------------------------------------------------------
// W e b S e r v i c e R e q u e s t
//-------------------------------------------------------------------
public bool DoWebServiceRequest (long requestNumber, HttpListenerContext context)
{
return false;
}
//-------------------------------------------------------------------
// H a n d l e R e q u e s t
//-------------------------------------------------------------------
private void HandleRequest (OpnHttpRequestData requestData, String logPrefix)
{
}
//-------------------------------------------------------------------
}
//=======================================================================
}