示例#1
0
        //private void Context_UpdateTriggered(ArkServerContext sender)
        //{
        //    UpdateTriggered?.Invoke(sender);
        //}

        public void AddCluster(ArkClusterContext context)
        {
            context.UpdateCompleted += Context_UpdateCompleted;
            context.GameDataUpdated += Context_GameDataUpdated;
            context._contextManager  = this;
            _clusterContexts.Add(context.Config.Key, context);
        }
示例#2
0
        public ArkClusterContext GetCluster(string key)
        {
            if (key == null)
            {
                return(null);
            }

            ArkClusterContext context = null;

            if (_clusterContexts.TryGetValue(key, out context))
            {
                return(context);
            }

            return(null);
        }
示例#3
0
 public ArkServerContext(
     IConfig fullconfig,
     ServerConfigSection config,
     ArkClusterContext clusterContext,
     ISavedState savedState,
     ArkAnonymizeData anonymizeData,
     ILifetimeScope scope)
     : base(
         config?.SaveFilePath,
         clusterContext,
         loadOnlyPropertiesInDomain: true)
 {
     Config           = config;
     _clusterContext  = clusterContext;
     _scope           = scope;
     _saveFileWatcher = _scope.Resolve <IArkSaveFileWatcher>(new TypedParameter(typeof(ArkServerContext), this));
     _savedState      = savedState;
     _anonymizeData   = anonymizeData;
     Steam            = new SteamManager(config);
 }
示例#4
0
 public void QueueClusterUpdate(ArkClusterContext clusterContext)
 {
     QueueUpdate(clusterContext, "Cluster", clusterContext.Config.Key);
 }
示例#5
0
 public void QueueUpdateClusterManual(ArkClusterContext clusterContext)
 {
     QueueUpdateManual(clusterContext, "Cluster", clusterContext.Config.Key);
 }