Esempio n. 1
0
 public ArkServerContext(ServerConfigSection config, ILifetimeScope scope)
 {
     Config           = config;
     _scope           = scope;
     _saveFileWatcher = _scope.Resolve <IArkSaveFileWatcher>(new TypedParameter(typeof(ArkServerContext), this));
     Steam            = new SteamManager(config);
 }
Esempio n. 2
0
        protected virtual void Dispose(bool disposing)
        {
            if (disposedValue)
            {
                return;
            }

            if (disposing)
            {
                _saveFileWatcher?.Dispose();
                _saveFileWatcher = null;

                Steam?.Dispose();
                Steam = null;
            }

            disposedValue = true;
        }
Esempio n. 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);
 }
Esempio n. 4
0
 public ArkServerContext(
     IConfig fullconfig,
     ServerConfigSection config,
     ArkClusterContext clusterContext,
     ISavedState savedState,
     ArkAnonymizeData anonymizeData,
     ILifetimeScope scope)
     : base(
         config?.SaveFilePath,
         clusterContext,
         fullconfig.SavegameExtractionMaxDegreeOfParallelism,
         true)
 {
     Config           = config;
     _clusterContext  = clusterContext;
     _scope           = scope;
     _saveFileWatcher = _scope.Resolve <IArkSaveFileWatcher>(new TypedParameter(typeof(ArkServerContext), this));
     _savedState      = savedState;
     _anonymizeData   = anonymizeData;
     Steam            = new SteamManager(config);
 }