private async Task CreateClusterAsync() { var configuration = await _configurationRepository.LoadConfigurationAsync(); var plugins = _clusterFactoryPluginManager.ReloadPlugins(configuration.PluginDirectory); _clusterFactoryPlugin = plugins.FirstOrDefault(plugin => plugin.ClusterId == configuration.ActiveClusterPluginId); _cluster = _clusterFactoryPlugin?.ConnectCluster(new ClusterConfiguration { PortName = configuration.ClusterPort }); if (_cluster != null) { _cluster.ConnectionLost += (sender, eventArgs) => CloseClusterConnection(); _userNotifier.ClusterConnectionChanged(_clusterFactoryPlugin.ClusterName, true); } }
public PluginModel(IClusterFactoryPlugin clusterFactoryPlugin) { Id = clusterFactoryPlugin.ClusterId; Name = clusterFactoryPlugin.ClusterName; }