public static KNBundle BundleWithAssembly(Assembly assembly)
{
if (assembly != null) {
string path = assembly.Location;
string parentPath = Path.GetDirectoryName(path);
KNBundle bundle;
if (bundleCache.ContainsKey(path)) {
if (bundleCache.TryGetValue(path, out bundle)) {
return bundle;
}
}
bundle = new KNBundle(parentPath, path, assembly);
return bundle;
} else {
return null;
}
}