public static IServerController GetClient() { if (_client == null) { _client = Framework.Network.CreateClient(); if (_client != null) { _client.OnDataReceived += ModulesReceived; _client.Connect(); _client.FetchModules(); _client.Disconnect(); } } return(_client); }
public static void RefreshModuleFiles() { try { var client = GetClient(); if (client != null) { _client.Connect(); _client.FetchModules(); _client.Disconnect(); } } catch (Exception error) { Framework.EventBus.Publish(error); } }