public static AssemblyDirectoryEntry[] From(string root, string[] files) { AssemblyDirectoryEntry[] results = new AssemblyDirectoryEntry[files.Length]; int clipFrom = root.Length; if (!root.EndsWith("\\") && !root.EndsWith("/")) { clipFrom++; } for (int i = 0; i < files.Length; i++) { AssemblyDirectoryEntry entry = new AssemblyDirectoryEntry(); entry._name = files[i].Substring(clipFrom); entry._path = files[i]; results[i] = entry; } return results; }
public static AssemblyDirectoryEntry[] From(string root, string[] files) { AssemblyDirectoryEntry[] results = new AssemblyDirectoryEntry[files.Length]; int clipFrom = root.Length; if (!root.EndsWith("\\") && !root.EndsWith("/")) { clipFrom++; } for (int i = 0; i < files.Length; i++) { AssemblyDirectoryEntry entry = new AssemblyDirectoryEntry(); entry._name = files[i].Substring(clipFrom); entry._path = files[i]; results[i] = entry; } return(results); }