Przeglądaj źródła

Merge branch 'master' of http://git.ius.plus:88/Project-Wing/WingCloudServer

denny 2 lat temu
rodzic
commit
ba2cc87501

+ 1 - 2
src/InteractionCenter/MasterInteractionCenterService.cs

@@ -8,8 +8,7 @@ using WingInterfaceLibrary.Interface.DBInterface;
 namespace WingCloudServer.InteractionCenter
 {
     public class MasterInteractionCenterService : InteractionCenterService, IMasterInteractionCenterService
-    {
-        protected IOpLogDBService OpLogDBService;
+    {        
         public override void Load(JsonRpcClientPool jsonRpcClientPool)
         {
             base.Load(jsonRpcClientPool);

+ 0 - 21
src/States/BaseServiceRunState.cs

@@ -1,21 +0,0 @@
-using System;
-
-namespace WingCloudServer.State
-{
-    public class BaseServiceRunState<T>
-    {
-        public T CurrentState { get; set; }
-        public virtual StateResult ExecuteSwitch(T state) 
-        {
-            if (!state.Equals(CurrentState))
-            {
-                CurrentState = state;
-                return new StateResult { IsSuccess = true };
-            }
-            else
-            {
-                return new StateResult { IsSuccess = false, Message = "It's in the current state" };
-            }
-        }
-    }
-}

+ 0 - 29
src/States/BaseServiceRunStateManager.cs

@@ -1,29 +0,0 @@
-using System;
-using System.Collections.Concurrent;
-
-namespace WingCloudServer.State
-{
-    public class BaseServiceRunStateManager
-    {
-        protected ConcurrentDictionary<ServiceEnum,BaseServiceRunState<ServiceStateEnum>> ServerStateDictionary { get; set; } = new();
-
-        public void SetServiceState(ServiceEnum serviceEnum, ServiceStateEnum serviceStateEnum)
-        {
-            ServerStateDictionary.AddOrUpdate(serviceEnum, f=> {
-                    var serviceState = new BaseServiceRunState<ServiceStateEnum>();
-                    serviceState.ExecuteSwitch(serviceStateEnum);
-                    return serviceState;
-                }, 
-                (f,v)=>{
-                    v.ExecuteSwitch(serviceStateEnum);
-                    return v;
-                });
-        }
-
-        public BaseServiceRunState<ServiceStateEnum> GetServiceState(ServiceEnum serverInstance)
-        {
-            ServerStateDictionary.TryGetValue(serverInstance, out BaseServiceRunState<ServiceStateEnum> serviceStateDictionary);
-            return serviceStateDictionary;
-        }
-    }
-}

+ 0 - 9
src/States/GetServiceStateRequest.cs

@@ -1,9 +0,0 @@
-using WingCloudServer.State;
-
-namespace src.States
-{
-    public class GetServiceStateRequest
-    {
-        public ServiceEnum serviceEnum { get; set; }
-    }
-}

+ 0 - 12
src/States/ServiceEnum.cs

@@ -1,12 +0,0 @@
-using System;
-
-namespace WingCloudServer.State
-{
-    public enum ServiceEnum
-    {
-        UserService,
-        StorageService,
-        LoginService,
-        MongoDBService
-    }
-}

+ 0 - 12
src/States/ServiceStateEnum.cs

@@ -1,12 +0,0 @@
-using System;
-
-namespace WingCloudServer.State
-{
-    public enum ServiceStateEnum
-    {
-        Online,
-        Offline,
-        Exception,
-        Reboot
-    }
-}

+ 0 - 10
src/States/StateResult.cs

@@ -1,10 +0,0 @@
-using System;
-
-namespace WingCloudServer.State
-{
-    public class StateResult
-    {
-        public bool IsSuccess { get; set; } = false;
-        public string Message { get; set; } = string.Empty;
-    }
-}

+ 1 - 1
src/WingApplication.cs

@@ -17,7 +17,7 @@ namespace WingCloudServer
             LoadResources();
         }
 
-        void InitilizeLogger()
+        void InitilizeLogger()  
         {
             var logEngine = new ServerLoggerEngine();
             var debugMode = ConfigurationManager.LogSettings.DebugMode;