public void Deactivate(string projectId, string repositoryId, string statusPolicyName) { var key = projectId + repositoryId; if (!ProjectStatusPolicies.ContainsKey(key)) { return; } ProjectStatusPolicies[key][statusPolicyName] = false; }
public void Activate(string projectId, string repositoryId, string statusPolicyName) { var key = projectId + repositoryId; if (!ProjectStatusPolicies.ContainsKey(key)) { ProjectStatusPolicies.Add(key, new Dictionary <string, bool>()); } ProjectStatusPolicies[key][statusPolicyName] = true; }
public bool IsStatusPolicyEnabled(string projectId, string repositoryId, string statusPolicyName) { var key = projectId + repositoryId; if (!ProjectStatusPolicies.ContainsKey(key)) { return(false); } var statusPolicies = ProjectStatusPolicies[key]; return(statusPolicies.ContainsKey(statusPolicyName) && statusPolicies[statusPolicyName]); }