internal static void CreateConstruction(string location, string target) { using (var sr = new StreamReader(location)) { string s = string.Empty; s = sr.ReadToEnd(); var c = new ConstructorObject(s); c.MakeAFile(target); } }
internal static void CreateConstruction(DirectoryInfo source, string target) { var files = source.GetFiles("*.cs", SearchOption.AllDirectories).ToList(); files.AsParallel().ForAll(f => { using (var sr = new StreamReader(f.FullName)) { string s = string.Empty; s = sr.ReadToEnd(); var c = new ConstructorObject(s); c.MakeAFile(target); } }); }