Exemple #1
0
        /// <summary>
        ///     Loads the plugins found by the plugin factory.
        /// </summary>
        /// <param name="settings">The settings to load plugins with.</param>
        internal void LoadPlugins(ServerSpawnData.ServerRegistrySettings settings)
        {
            if (settings.ServerRegistryConnector?.Type != null)
            {
                ServerRegistryConnectorLoadData loadData = new ServerRegistryConnectorLoadData(
                    settings.ServerRegistryConnector.Type,
                    server,
                    settings.ServerRegistryConnector.Settings ?? new NameValueCollection(),
                    logManager.GetLoggerFor(settings.ServerRegistryConnector.Type),
                    metricsManager.GetMetricsCollectorFor(settings.ServerRegistryConnector.Type)
                    );

                ServerRegistryConnector = pluginFactory.Create <ServerRegistryConnector>(settings.ServerRegistryConnector.Type, loadData, null);
            }
        }
Exemple #2
0
 /// <summary>
 ///     Creates a new server registry connector.
 /// </summary>
 /// <param name="serverRegistryConnectorLoadData">The data to load the connector with.</param>
 public ServerRegistryConnector(ServerRegistryConnectorLoadData serverRegistryConnectorLoadData) : base(serverRegistryConnectorLoadData)
 {
     server = serverRegistryConnectorLoadData.Server;
     ServerRegistryConnectorManager = serverRegistryConnectorLoadData.ServerRegistryConnectorManager;
     RemoteServerManager            = serverRegistryConnectorLoadData.RemoteServerManager;
 }