KNFoundation.KNBundle.BundleWithAssembly C# (CSharp) Method

BundleWithAssembly() public static method

public static BundleWithAssembly ( Assembly assembly ) : KNBundle
assembly System.Reflection.Assembly
return KNBundle
        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;
            }
        }