public void ProcessMessage(string msg, IConnectionAPI api, long source) { string result = string.Empty; foreach (IModule module in Modules) { result += module.ProcessMessage(msg); } if (result != string.Empty) { api.SendMessage(result, source); } }
public void DisableAPI(APIList id) { IConnectionAPI api = APIs.Find(x => (x.ID == id && x.Status != APIStatus.Disabled)); api?.Disconnect(); }
public void EnableAPI(APIList id) { IConnectionAPI api = APIs.Find(x => (x.ID == id && x.Status == APIStatus.Disabled)); api?.Connect(this); }