public virtual void LoadFilesFromContentFolder(PackageAssetDirectory directory, string contentFolder)
        {
            ReadAssetType(directory, contentFolder, AssetFolder.styles);

            ReadAssetType(directory, contentFolder, AssetFolder.images);
            ReadAssetType(directory, contentFolder, AssetFolder.scripts);
        }
        public virtual void LoadFilesFromContentFolder(PackageAssetDirectory directory, string contentFolder)
        {
            ReadAssetType(directory, contentFolder, AssetFolder.styles);


            ReadAssetType(directory, contentFolder, AssetFolder.images);
            ReadAssetType(directory, contentFolder, AssetFolder.scripts);
        }
Exemple #3
0
 public AssetFileBuilder(IAssetFileRegistration registration, string specificDirectory,
                         PackageAssetDirectory directory, AssetFolder assetFolder)
 {
     _registration      = registration;
     _specificDirectory = specificDirectory;
     _directory         = directory;
     _assetFolder       = assetFolder;
 }
Exemple #4
0
 public AssetFileBuilder(IAssetFileRegistration registration, string specificDirectory,
     PackageAssetDirectory directory, AssetFolder assetFolder)
 {
     _registration = registration;
     _specificDirectory = specificDirectory;
     _directory = directory;
     _assetFolder = assetFolder;
 }
        public virtual void LoadFilesFromContentFolder(PackageAssetDirectory directory, string contentFolder)
        {
            Console.WriteLine("Reading assets for package {0} in directory {1}", directory.PackageName, contentFolder);

            ReadAssetType(directory, contentFolder, AssetFolder.styles);

            ReadAssetType(directory, contentFolder, AssetFolder.images);
            ReadAssetType(directory, contentFolder, AssetFolder.scripts);
        }
        public virtual void LoadFilesFromContentFolder(PackageAssetDirectory directory, string contentFolder)
        {
            Console.WriteLine("Reading assets for package {0} in directory {1}", directory.PackageName, contentFolder);

            ReadAssetType(directory, contentFolder, AssetFolder.styles);


            ReadAssetType(directory, contentFolder, AssetFolder.images);
            ReadAssetType(directory, contentFolder, AssetFolder.scripts);
        }
        public void ReadAssetType(PackageAssetDirectory directory, string contentFolder, AssetFolder assetFolder)
        {
            var specificFolder = contentFolder.AppendPath(assetFolder.ToString());
            if (_system.DirectoryExists(specificFolder))
            {
                _log.Trace(LoadingAssetTypeForPackageAt.ToFormat(specificFolder));
                var builder = new AssetFileBuilder(_registration, specificFolder, directory, assetFolder);

                _system.FindFiles(specificFolder, FileSet.Everything()).Each(builder.CreateAssetFile);
            }
        }
        public void ReadAssetType(PackageAssetDirectory directory, string contentFolder, AssetFolder assetFolder)
        {
            var specificFolder = contentFolder.AppendPath(assetFolder.ToString());

            if (_system.DirectoryExists(specificFolder))
            {
                _log.Trace(LoadingAssetTypeForPackageAt.ToFormat(specificFolder));
                var builder = new AssetFileBuilder(_registration, specificFolder, directory, assetFolder);

                _system.FindFiles(specificFolder, FileSet.Everything()).Each(builder.CreateAssetFile);
            }
        }
        // TODO -- gotta put some serious logging here when we get to diagnostics
        // and package loading
        public void LoadFiles(PackageAssetDirectory directory)
        {
            var contentFolder = FindContentFolder(directory.Directory);
            if (contentFolder == null)
            {
                string theMessage = NoContentFoundForPackageAt.ToFormat(directory.Directory);
                _log.Trace(theMessage);

                return;
            }

            _log.Trace(LoadingContentForPackageAt.ToFormat(contentFolder));
            LoadFilesFromContentFolder(directory, contentFolder);
        }
        // TODO -- gotta put some serious logging here when we get to diagnostics
        // and package loading
        public void LoadFiles(PackageAssetDirectory directory)
        {
            var contentFolder = FindContentFolder(directory.Directory);

            if (contentFolder == null)
            {
                string theMessage = NoContentFoundForPackageAt.ToFormat(directory.Directory);
                _log.Trace(theMessage);

                return;
            }

            _log.Trace(LoadingContentForPackageAt.ToFormat(contentFolder));
            LoadFilesFromContentFolder(directory, contentFolder);
        }