예제 #1
0
        void LoadReleaseBundles(string bundlename, List <BundleItFile> files, List <BundleItFile> bundle_resolved_files, eBundleType type)
        {
            foreach (var s in files)
            {
                // load referenced bundle files
                if (!string.IsNullOrEmpty(s.bundle_ref_name))
                {
                    // get files by bundle name
                    List <BundleItFile> refbundlefiles = null;
                    if (type == eBundleType.script)
                    {
                        refbundlefiles = _script_files.Where(f => f.bundle_name == s.bundle_ref_name).ToList();
                    }

                    if (type == eBundleType.style)
                    {
                        refbundlefiles = _style_files.Where(f => f.bundle_name == s.bundle_ref_name).ToList();
                    }

                    LoadReleaseBundles(bundlename, refbundlefiles, bundle_resolved_files, type);
                }
                else
                {
                    var clone = BundleItFile.Clone(s);
                    clone.bundle_name = bundlename;
                    bundle_resolved_files.Add(clone);
                }
            }
        }
예제 #2
0
        public Bundle AddStyles(string bundlename, List <BundleItFile> files)
        {
            bundlename = bundlename.ToUpper();
            files.ForEach(f => f.bundle_name = bundlename);

            var clone = new BundleItFile[files.Count];

            files.CopyTo(clone);
            _style_files.AddRange(clone);

            return(new Bundle(bundlename));
        }