public List <Proxy> RemoveProxy(Proxy proxy) { yamlConfig.ProxyList.Remove(proxy); saveYamlConfigFile(); List <Proxy> newProxyList = new List <Proxy>(yamlConfig.ProxyList); ProxyChangedEvent?.Invoke(Instance, newProxyList); return(new List <Proxy>(yamlConfig.ProxyList)); }
public List <Proxy> AddProxy(Proxy proxy) { yamlConfig.ProxyList.Add(proxy); reCreateProxyGroups(); saveYamlConfigFile(); List <Proxy> newProxyList = new List <Proxy>(yamlConfig.ProxyList); ProxyChangedEvent?.Invoke(Instance, newProxyList); return(newProxyList); }