private static void ProcessDirectoryWithRuntimePolicyFiles(string source, string destination) { var discovery = new PolicyDiscovery(); var runtimePolicyFiles = discovery.Find(source); if (runtimePolicyFiles.Count == 0) { Console.WriteLine("ERROR: No runtime policy files found in : " + source); } else { string dest = destination; foreach (var runtimePolicyFile in runtimePolicyFiles) { string fileName = Path.GetFileName(runtimePolicyFile); Console.WriteLine("PROCESSING - " + fileName); if (string.IsNullOrEmpty(destination)) { dest = runtimePolicyFile; } else { dest = Path.Combine(destination, Path.GetFileName(runtimePolicyFile)); } new PolicyOptimizer(runtimePolicyFile, dest); } } }
public static void ProcessAllRuntimePolicies() { var discovery = new PolicyDiscovery(); var runtimePolicyFiles = discovery.Find(); foreach (var runtimePolicyFile in runtimePolicyFiles) { Console.WriteLine("PROCESSING: " + Path.GetFileName(runtimePolicyFile)); new PolicyOptimizer(runtimePolicyFile, runtimePolicyFile); } }
public static void Discover() { Console.WriteLine("INFORMATION: Finding all of the runtime policy files."); var discovery = new PolicyDiscovery(); var runtimePolicyFiles = discovery.Find(); foreach (var runtimePolicyFile in runtimePolicyFiles) { Console.WriteLine(runtimePolicyFile); } }