/// <summary> /// Ends the current policy. /// </summary> /// <exception cref="InvalidOperationException">when there is no current policy.</exception> public void EndPolicy() { CheckStartedPolicy(); categoriesStack.Peek().AddPolicy(currentPolicy); currentPolicy = null; }
/// <summary> /// Starts a new policy on the current category. /// </summary> /// <param name="policyName">The name for the new policy.</param> /// <param name="policyKey">The registry key for the new policy.</param> /// <exception cref="InvalidOperationException">when there is no current category.</exception> /// <exception cref="InvalidOperationException">when there is an unfinished policy being built.</exception> public void StartPolicy(String policyName, String policyKey) { CheckPolicyName(policyName); CheckKeyName(policyKey, true); CheckCurrentCategory(); CheckNoStartedPolicy(); currentPolicy = new AdmPolicy(policyName, policyKey, AvailableValueName); }
internal void AddPolicy(AdmPolicy policy) { policies.Add(policy); }
internal void AddPolicy(AdmPolicy policy) { this.policies.Add(policy); }