public void ParametersNotContainApiKeys(Dictionary<string, string> parameters, RootObject rootObject, string topic, string action) { foreach (var item in parameters) { if (item.Key == "api_key" && item.Key == "api_secret" && item.Key == "access_token") { throw new Exception(); } } }
public void IsMethodValid(string topic, string action, RootObject rootObject) { var result = rootObject.Topic.SingleOrDefault(s => s.Name == topic).Action.SingleOrDefault(s => s.Name == action); if (result == null) throw new Exception(); }