|
|
@@ -1,5 +1,6 @@
|
|
|
using System;
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
+using Quadarax.Foundation.Core.Business.Enums;
|
|
|
using Quadarax.Foundation.Core.Business.Interface;
|
|
|
using Quadarax.Foundation.Core.Data.Interface.Domain;
|
|
|
using Quadarax.Foundation.Core.Data.Interface.Entity;
|
|
|
@@ -14,11 +15,14 @@ namespace Quadarax.Foundation.Core.Business
|
|
|
protected IContext CurrentContext { get; }
|
|
|
|
|
|
protected ILoggerFactory LoggerFactory { get; }
|
|
|
+
|
|
|
+ public ServiceStateEnum State { get; protected set; }
|
|
|
#endregion
|
|
|
|
|
|
#region *** Constructors ***
|
|
|
protected AbstractService(IContext currentContext, ILoggerFactory logger)
|
|
|
{
|
|
|
+ State = ServiceStateEnum.Initializing;
|
|
|
CurrentContext = currentContext ?? throw new ArgumentNullException(nameof(currentContext));
|
|
|
if (logger == null)throw new ArgumentNullException(nameof(logger));
|
|
|
|
|
|
@@ -31,6 +35,8 @@ namespace Quadarax.Foundation.Core.Business
|
|
|
// currentContext = new GenericPrincipal(genericIdentity, new string[] {});
|
|
|
//}
|
|
|
Log.LogTrace($"Service '{GetType().Name}' [Hash:{GetHashCode()}] initialized.");
|
|
|
+
|
|
|
+ State = ServiceStateEnum.Online;
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
@@ -60,6 +66,8 @@ namespace Quadarax.Foundation.Core.Business
|
|
|
#endregion
|
|
|
|
|
|
#region *** Public Operations ***
|
|
|
+
|
|
|
+
|
|
|
public IResult Test()
|
|
|
{
|
|
|
return new ResultPlain();
|