/// <summary> /// Check the settings file and restrict the operation if needed. /// </summary> /// <param name="eventArgs"></param> private void RestrictOperation(WebServiceCommandEventArgs eventArgs, string eventName) { RestrictSettings settings = RestrictSettings.Load(); if (settings.RestrictedOperations.Contains(eventName)) { eventArgs.AddRestriction(new ExtensionRestriction("Unknown", "Test restriction")); } }
/// <summary> /// Check the settings file and restrict the operation if needed. /// </summary> /// <param name="eventArgs"></param> private void RestrictOperation(WebServiceCommandEventArgs eventArgs, string eventName) { RestrictSettings settings = RestrictSettings.Load(); if (settings.RestrictedOperations.Contains(eventName)) { eventArgs.AddRestriction(new ExtensionRestriction("Parallel Approval - Change State", "The listed states are required to finally release: " + mParallelStates[0] + ", " + mParallelStates[1] + ", " + mParallelStates[2])); } }