Ejemplo n.º 1
0
 public ProcessorInstance(ProcessorType type)
 {
     Type           = type;
     Instance       = type.CreateInstance();
     WriterInstance = type.CreateWriterInstance();
     LoaderHash     = StringHash(LoaderName);
 }
Ejemplo n.º 2
0
        public RecentPostsViewModel(IContentProcessor contentProcessor)
        {
            _contentProcessor = contentProcessor;

            ProjectSettings = new ProjectSettings();
            Posts           = new List <IPost>();
        }
 public BlogController(
     IProjectService projectService,
     IBlogService blogService,
     IBlogRoutes blogRoutes,
     IContentProcessor contentProcessor,
     IProjectEmailService emailService,
     IAuthorizationService authorizationService,
     IAuthorNameResolver authorNameResolver,
     ITimeZoneHelper timeZoneHelper,
     IStringLocalizer <SimpleContent> localizer,
     IOptions <SimpleContentConfig> configOptionsAccessor,
     ILogger <BlogController> logger
     )
 {
     this.projectService       = projectService;
     this.blogService          = blogService;
     this.contentProcessor     = contentProcessor;
     this.blogRoutes           = blogRoutes;
     this.authorNameResolver   = authorNameResolver;
     this.emailService         = emailService;
     this.authorizationService = authorizationService;
     this.timeZoneHelper       = timeZoneHelper;
     sr     = localizer;
     log    = logger;
     config = configOptionsAccessor.Value;
 }
 public BlogService(
     IProjectService projectService,
     IProjectSecurityResolver security,
     IPostQueries postQueries,
     IPostCommands postCommands,
     IMediaProcessor mediaProcessor,
     IContentProcessor contentProcessor,
     //IHtmlProcessor htmlProcessor,
     IBlogRoutes blogRoutes,
     PostEvents eventHandlers,
     IUrlHelperFactory urlHelperFactory,
     IActionContextAccessor actionContextAccesor,
     IHttpContextAccessor contextAccessor = null)
 {
     this.security             = security;
     this.postQueries          = postQueries;
     this.postCommands         = postCommands;
     context                   = contextAccessor?.HttpContext;
     this.mediaProcessor       = mediaProcessor;
     this.urlHelperFactory     = urlHelperFactory;
     this.actionContextAccesor = actionContextAccesor;
     this.projectService       = projectService;
     //this.htmlProcessor = htmlProcessor;
     _contentProcessor  = contentProcessor;
     this.blogRoutes    = blogRoutes;
     this.eventHandlers = eventHandlers;
 }
 public ContentProcessorLauncher(IContentProcessor contentProcessor, IWordsRepository wordsRepository, ITextFileReader textFileReader, IInputOutput inputOutput)
 {
     _contentProcessor = contentProcessor;
     _wordsRepository  = wordsRepository;
     _textFileReader   = textFileReader;
     _inputOutput      = inputOutput;
 }
Ejemplo n.º 6
0
 public PageService(
     IProjectService projectService,
     IProjectSecurityResolver security,
     IPageQueries pageQueries,
     IPageCommands pageCommands,
     PageEvents eventHandlers,
     IMediaProcessor mediaProcessor,
     IContentProcessor contentProcessor,
     //IHtmlProcessor htmlProcessor,
     IUrlHelperFactory urlHelperFactory,
     IPageRoutes pageRoutes,
     IMemoryCache cache,
     IStringLocalizer <cloudscribe.SimpleContent.Web.SimpleContent> localizer,
     IPageNavigationCacheKeys cacheKeys,
     IActionContextAccessor actionContextAccesor,
     IHttpContextAccessor contextAccessor = null)
 {
     this.projectService       = projectService;
     this.security             = security;
     this.pageQueries          = pageQueries;
     this.pageCommands         = pageCommands;
     context                   = contextAccessor?.HttpContext;
     this.mediaProcessor       = mediaProcessor;
     this.urlHelperFactory     = urlHelperFactory;
     this.actionContextAccesor = actionContextAccesor;
     this.pageRoutes           = pageRoutes;
     _contentProcessor         = contentProcessor;
     //this.htmlProcessor = htmlProcessor;
     this.cache         = cache;
     this.cacheKeys     = cacheKeys;
     this.eventHandlers = eventHandlers;
     sr = localizer;
 }
        public static async Task CopyFromAsync(this HttpListenerResponse response, HttpResponseMessage message,
            IContentProcessor contentProcessor)
        {
            response.StatusCode = (int) message.StatusCode;
            foreach (var httpResponseHeader in message.Headers.Where(header => !Filter.Contains(header.Key)))
            {
                foreach (var value in httpResponseHeader.Value)
                {
                    response.AddHeader(httpResponseHeader.Key, value);
                }
            }
            foreach (var httpResponseHeader in message.Content.Headers.Where(header => !Filter.Contains(header.Key)))
            {
                foreach (var value in httpResponseHeader.Value)
                {
                    response.AddHeader(httpResponseHeader.Key, value);
                }
            }
            response.SendChunked = false;
            response.KeepAlive = false;

            var bytes = await message.Content.ReadAsByteArrayAsync();

            if (bytes.Length <= 0) return;

            if (contentProcessor != null)
            {
                bytes = contentProcessor.Process(bytes, message.Content.Headers.ContentType,
                    message.RequestMessage.RequestUri);
            }

            response.ContentLength64 = bytes.Length;
            await response.OutputStream.WriteAsync(bytes, 0, bytes.Length);
        }
Ejemplo n.º 8
0
 public PageService(
     IProjectService projectService,
     IPageQueries pageQueries,
     IPageCommands pageCommands,
     PageEvents eventHandlers,
     IMediaProcessor mediaProcessor,
     IContentProcessor contentProcessor,
     IPageUrlResolver pageUrlResolver,
     IMemoryCache cache,
     IStringLocalizer <cloudscribe.SimpleContent.Web.SimpleContent> localizer,
     IPageNavigationCacheKeys cacheKeys,
     IContentHistoryCommands historyCommands,
     ILogger <PageService> logger
     )
 {
     _projectService   = projectService;
     _pageQueries      = pageQueries;
     _pageCommands     = pageCommands;
     _mediaProcessor   = mediaProcessor;
     _pageUrlResolver  = pageUrlResolver;
     _contentProcessor = contentProcessor;
     _cache            = cache;
     _cacheKeys        = cacheKeys;
     _eventHandlers    = eventHandlers;
     _sr = localizer;
     _historyCommands = historyCommands;
     _log             = logger;
 }
Ejemplo n.º 9
0
        public ContentItem LoadContentItem(string filename,
                                           IContentImporter importer              = null,
                                           IContentProcessor processor            = null,
                                           Dictionary <string, object> opaqueData = null)
        {
            if (opaqueData == null)
            {
                opaqueData = new Dictionary <string, object>();
            }
            if (importer == null)
            {
                importer = CreateImporter(FindImporterByExtension(Path.GetExtension(filename)), opaqueData);
            }
            if (processor == null)
            {
                processor = CreateProcessor(FindDefaultProcessor(importer.GetType()), opaqueData);
            }

            object item;

            using (FileStream stream = File.OpenRead(filename))
            {
                item = importer.Import(stream, this);
            }
            _processorContext.PushDirectory(Path.GetDirectoryName(filename));
            item = processor.Process(item, _processorContext);
            _processorContext.PopDirectory();

            return((ContentItem)item);
        }
 public ContentProcessorLauncher(IContentProcessor contentProcessor, IWordsRepository wordsRepository, ITextFileReader textFileReader, IInputOutput inputOutput)
 {
     _contentProcessor = contentProcessor;
     _wordsRepository = wordsRepository;
     _textFileReader = textFileReader;
     _inputOutput = inputOutput;
 }
Ejemplo n.º 11
0
        public SearchIndex(IContentProcessor contentProcessor)
        {
            _contentProcessor = contentProcessor;
            _appPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            DocumentCount = 0;
        }
Ejemplo n.º 12
0
        public BlogController(
            IProjectService projectService,
            IBlogService blogService,
            IBlogRoutes blogRoutes,
            IContentProcessor contentProcessor,
            IProjectEmailService emailService,
            IAuthorizationService authorizationService,
            IAuthorNameResolver authorNameResolver,
            ITimeZoneHelper timeZoneHelper,
            IRecaptchaServerSideValidator recaptchaServerSideValidator,
            IStringLocalizer <SimpleContent> localizer,
            IOptions <SimpleContentConfig> configOptionsAccessor,
            ILogger <BlogController> logger

            )
        {
            ProjectService       = projectService;
            BlogService          = blogService;
            ContentProcessor     = contentProcessor;
            BlogRoutes           = blogRoutes;
            AuthorNameResolver   = authorNameResolver;
            EmailService         = emailService;
            AuthorizationService = authorizationService;
            TimeZoneHelper       = timeZoneHelper;
            StringLocalizer      = localizer;
            Log            = logger;
            ContentOptions = configOptionsAccessor.Value;
            RecaptchaServerSideValidator = recaptchaServerSideValidator;
        }
 public BlogViewModel(IContentProcessor contentProcessor)
 {
     _contentProcessor = contentProcessor;
     ProjectSettings   = new ProjectSettings();
     Paging            = new PaginationSettings();
     Categories        = new Dictionary <string, int>();
     Archives          = new Dictionary <string, int>();
     BlogRoutes        = new DefaultBlogRoutes();
 }
Ejemplo n.º 14
0
        public DataStoreBasedTestStorage(IDataStore dataStorage, Func <IDataStore, bool> isTestCasePredicate, IContentProcessor processor = null, IDataStoreProvider dataStoreProvider = null, ILogger <DataStoreBasedTestStorage> logger = null)
        {
            _isTestCasePredicate = isTestCasePredicate;
            ContentProcessor     = processor;
            DataStorage          = dataStorage;
            _dataStoreProvider   = dataStoreProvider;

            _logger = logger;
        }
Ejemplo n.º 15
0
        public TestStorage(IDataStore dataStorage, Func <IDataStore, bool> isTestCasePredicate, IContentProcessor processor, IDataStoreProvider dataStoreProvider, ILoggerFactory loggerFactory)
        {
            _isTestCasePredicate = isTestCasePredicate;
            ContentProcessor     = processor;
            DataStorage          = dataStorage;
            _dataStoreProvider   = dataStoreProvider;

            _logger = loggerFactory.CreateLogger <TestStorage>();
        }
Ejemplo n.º 16
0
        /// <summary>
        /// Initializes a new DirectXGraphics class.
        /// </summary>
        public DirectXGraphics()
        {
            ResourceManager = new DirectXResourceManager();
            ContentProcessors = new IContentProcessor[]
            {new DirectXFontContentProcessor(), new DirectXPenContentProcessor(), new DirectXTextureContentProcessor()};
            SmoothingMode = SmoothingMode.AntiAlias;
            InterpolationMode = InterpolationMode.Linear;

            _graphicsDevice = SGL.QueryComponents<GraphicsDevice>();
        }
Ejemplo n.º 17
0
        /// <summary>
        /// Initializes a new DirectXGraphics class.
        /// </summary>
        public DirectXGraphics()
        {
            ResourceManager   = new DirectXResourceManager();
            ContentProcessors = new IContentProcessor[]
            { new DirectXFontContentProcessor(), new DirectXPenContentProcessor(), new DirectXTextureContentProcessor() };
            SmoothingMode     = SmoothingMode.AntiAlias;
            InterpolationMode = InterpolationMode.Linear;

            _graphicsDevice = SGL.QueryComponents <GraphicsDevice>();
        }
Ejemplo n.º 18
0
 internal Bundle(IContentProcessor contentProcessor, IBundleObserver observer, string name, string content = null)
     : base(contentProcessor, name)
 {
     if (observer == null)
     {
         throw new ArgumentNullException("observer");
     }
     m_Observer  = observer;
     PureContent = content ?? contentProcessor.GetEmptyContent();
 }
Ejemplo n.º 19
0
        public HttpRedirect(RedirectSettings settings)
        {
            _urlProcessor = settings.UrlProcessor;
            _cookieProcessor = settings.CookieProcessor ?? new CookieProcessor();
            _responseContentProcessor = settings.ResponseContentProcessor;

            _listener = new HttpListener();
            foreach (var url in settings.Urls)
            {
                _listener.Prefixes.Add(url);
            }
        }
Ejemplo n.º 20
0
 public FeaturedPostsViewComponent(
     IProjectService projectService,
     IPostQueries postQueries,
     IContentProcessor contentProcessor,
     ITimeZoneHelper timeZoneHelper
     )
 {
     _projectService   = projectService;
     _postQueries      = postQueries;
     _timeZoneHelper   = timeZoneHelper;
     _contentProcessor = contentProcessor;
 }
Ejemplo n.º 21
0
 public RecentPostsViewComponent(
     IProjectService projectService,
     IPostQueries postQueries,
     IContentProcessor contentProcessor,
     ITimeZoneHelper timeZoneHelper
     )
 {
     this.projectService   = projectService;
     this.postQueries      = postQueries;
     this.timeZoneHelper   = timeZoneHelper;
     this.contentProcessor = contentProcessor;
 }
Ejemplo n.º 22
0
        public HttpRedirect(RedirectSettings settings)
        {
            _urlProcessor             = settings.UrlProcessor;
            _cookieProcessor          = settings.CookieProcessor ?? new CookieProcessor();
            _responseContentProcessor = settings.ResponseContentProcessor;

            _listener = new HttpListener();
            foreach (var url in settings.Urls)
            {
                _listener.Prefixes.Add(url);
            }
        }
Ejemplo n.º 23
0
 protected BundleCollectionBase(IContentProcessor contentProcessor, string name)
 {
     if (contentProcessor == null)
     {
         throw new ArgumentNullException("contentProcessor");
     }
     if (!ValidationHelper.IsValidBundleName(name))
     {
         throw new ArgumentException(ValidationHelper.INVALID_NAME_MESSAGE, "name");
     }
     m_ContentProcessor = contentProcessor;
     m_Name             = name.ToLower();
 }
Ejemplo n.º 24
0
        static void Main(string[] args)
        {
            log4net.Config.BasicConfigurator.Configure(new log4net.Appender.DebugAppender());

            _opaqueData["TextureType"] = TextureType.Texture2D;
            if (!ParseCommandLine(args))
            {
                return;
            }

            if (string.IsNullOrEmpty(_outputName))
            {
                _outputName = string.Format("{0}.meb", Path.GetFileNameWithoutExtension(_imageName));
            }



            //GetTypeWriters();
            ProcessAssemblies();

            string ext = Path.GetExtension(_imageName).ToLower();
            var    imp = _importers.FirstOrDefault(i => i.attribue.FileExtensions.Contains(ext));

            if (imp.type == null)
            {
                Console.WriteLine("file format is not handled by TextureImporter.");
                return;
            }

            ContentManager           manager = new ContentManager(_log);
            ContentTypeWriterManager contentTypeWriterManager = new ContentTypeWriterManager();

            contentTypeWriterManager.RegisterTypeWriter <Texture2DContent>(new Texture2DWriter());

            IContentImporter importer = CreateImporter(imp.type, _opaqueData);

            var content = importer.Import(_imageName, manager);

            IContentProcessor processor = CreateProcessor(FindDefaultProcessor(importer.GetType()), _opaqueData);

            object processedContent = processor.Process(content, new ContentProcessorContext());

            ContentTypeWriter typeWriter = GetTypeWriter(processedContent.GetType());

            using (FileStream stream = new FileStream(_outputName, FileMode.OpenOrCreate))
            {
                ContentWriter writer = manager.CreateWriter(contentTypeWriterManager, stream);
                writer.WriteObject(processedContent, typeWriter);
                writer.Flush();
            }
        }
Ejemplo n.º 25
0
        /// <summary>
        /// Initializes a new DirectXGraphics class.
        /// </summary>
        public DirectXGraphics()
        {
            ResourceManager = new DirectXResourceManager();
            ContentProcessors = new IContentProcessor[]
            {new DirectXFontContentProcessor(), new DirectXPenContentProcessor(), new DirectXTextureContentProcessor()};
            SmoothingMode = SmoothingMode.AntiAlias;
            InterpolationMode = InterpolationMode.Linear;

            _graphicsDevice = SGL.QueryComponents<GraphicsDevice>();

            var d2DFactory = new Factory(FactoryType.MultiThreaded);
            DirectXHelper.D2DFactory = d2DFactory;
            DirectXHelper.DirectWriteFactory = new SharpDX.DirectWrite.Factory(SharpDX.DirectWrite.FactoryType.Shared);
        }
Ejemplo n.º 26
0
 public BlogUrlResolver(
     IHttpContextAccessor contextAccessor,
     IUrlHelperFactory urlHelperFactory,
     IActionContextAccessor actionContextAccesor,
     IContentProcessor contentProcessor,
     IBlogRoutes blogRoutes
     )
 {
     _contextAccessor      = contextAccessor;
     _urlHelperFactory     = urlHelperFactory;
     _actionContextAccesor = actionContextAccesor;
     _contentProcessor     = contentProcessor;
     _blogRoutes           = blogRoutes;
 }
Ejemplo n.º 27
0
 public PageUrlResolver(
     IHttpContextAccessor contextAccessor,
     IUrlHelperFactory urlHelperFactory,
     IActionContextAccessor actionContextAccesor,
     IContentProcessor contentProcessor,
     IPageRoutes pageRoutes
     )
 {
     _contextAccessor      = contextAccessor;
     _urlHelperFactory     = urlHelperFactory;
     _actionContextAccesor = actionContextAccesor;
     _contentProcessor     = contentProcessor;
     _pageRoutes           = pageRoutes;
 }
Ejemplo n.º 28
0
        /// <summary>
        /// Initializes a new DirectXGraphics class.
        /// </summary>
        public DirectXGraphics()
        {
            ResourceManager   = new DirectXResourceManager();
            ContentProcessors = new IContentProcessor[]
            { new DirectXFontContentProcessor(), new DirectXPenContentProcessor(), new DirectXTextureContentProcessor() };
            SmoothingMode     = SmoothingMode.AntiAlias;
            InterpolationMode = InterpolationMode.Linear;

            _graphicsDevice = SGL.QueryComponents <GraphicsDevice>();

            var d2DFactory = new Factory(FactoryType.MultiThreaded);

            DirectXHelper.D2DFactory         = d2DFactory;
            DirectXHelper.DirectWriteFactory = new SharpDX.DirectWrite.Factory(SharpDX.DirectWrite.FactoryType.Shared);
        }
 public RssChannelProvider(
     IProjectService projectService,
     IBlogService blogService,
     IBlogRoutes blogRoutes,
     IHttpContextAccessor contextAccessor,
     IUrlHelperFactory urlHelperFactory,
     IActionContextAccessor actionContextAccesor,
     IContentProcessor contentProcessor
     )
 {
     this.projectService       = projectService;
     this.blogService          = blogService;
     this.contextAccessor      = contextAccessor;
     this.urlHelperFactory     = urlHelperFactory;
     this.actionContextAccesor = actionContextAccesor;
     _contentProcessor         = contentProcessor;
     this.blogRoutes           = blogRoutes;
 }
Ejemplo n.º 30
0
        public override bool Execute()
        {
            Log.LogMessage("Building content:");

            XBuildLogger    logger   = new XBuildLogger(this.Log);
            ContentCompiler compiler = new ContentCompiler(PipelineAssemblies);

            foreach (ITaskItem sourceItem in SourceAssets)
            {
                //foreach (string name in sourceItem.MetadataNames)
                //	Log.LogMessage(name + " : " + sourceItem.GetMetadata(name));
                string assetName = sourceItem.GetMetadata("Name");

                Log.LogMessage("Building " + assetName);

                Stream        outputStream  = new FileStream(OutputDirectory + assetName + ".xnb", FileMode.OpenOrCreate);
                ContentWriter contentWriter = new ContentWriter(outputStream, getTargetPlatform(), CompressContent);

                string importerName  = sourceItem.GetMetadata("Importer");
                string processorName = sourceItem.GetMetadata("Processor");

                IContentImporter importer = getImporterInstance(importerName);
                if (importer == null)
                {
                    Log.LogError("Could not find the importer (" + importerName + ")");
                }

                IContentProcessor processor = getProcessorInstance(processorName);
                if (importer == null)
                {
                    Log.LogError("Could not find the processor (" + processorName + ")");
                }

                Log.LogMessage("Using " + importerName + " and " + processorName);

                ContentImporterContext  importerContext  = new ContentImporterContext(this, IntermediateDirectory, OutputDirectory, logger);
                ContentProcessorContext processorContext = new ContentProcessorContext();

                processor.Process(importer.Import(sourceItem.GetMetadata("Include"), importerContext), processorContext);
            }

            return(true);
        }
Ejemplo n.º 31
0
 public RssChannelProvider(
     IProjectService projectService,
     IBlogService blogService,
     IBlogUrlResolver blogUrlResolver,
     IBlogRoutes blogRoutes,
     IHttpContextAccessor contextAccessor,
     IUrlHelperFactory urlHelperFactory,
     IActionContextAccessor actionContextAccesor,
     IContentProcessor contentProcessor
     )
 {
     ProjectService       = projectService;
     BlogService          = blogService;
     BlogUrlResolver      = blogUrlResolver;
     ContextAccessor      = contextAccessor;
     UrlHelperFactory     = urlHelperFactory;
     ActionContextAccesor = actionContextAccesor;
     ContentProcessor     = contentProcessor;
     BlogRoutes           = blogRoutes;
 }
 public BlogService(
     IProjectService projectService,
     IPostQueries postQueries,
     IPostCommands postCommands,
     IContentProcessor contentProcessor,
     IBlogUrlResolver blogUrlResolver,
     PostEvents eventHandlers,
     IContentHistoryCommands historyCommands,
     ILogger <BlogService> logger
     )
 {
     _postQueries      = postQueries;
     _postCommands     = postCommands;
     _projectService   = projectService;
     _contentProcessor = contentProcessor;
     _blogUrlResolver  = blogUrlResolver;
     _eventHandlers    = eventHandlers;
     _historyCommands  = historyCommands;
     _log = logger;
 }
        public PageService(
            IProjectService projectService,
            IPageQueries pageQueries,
            IPageCommands pageCommands,
            PageEvents eventHandlers,
            IContentProcessor contentProcessor,
            IStringLocalizer <cloudscribe.SimpleContent.Web.SimpleContent> localizer,
            IContentHistoryCommands historyCommands,
            ILogger <PageService> logger
            )
        {
            _projectService   = projectService;
            _pageQueries      = pageQueries;
            _pageCommands     = pageCommands;
            _contentProcessor = contentProcessor;
            _eventHandlers    = eventHandlers;
            _sr = localizer;
            _historyCommands = historyCommands;

            _log = logger;
        }
Ejemplo n.º 34
0
 public PageController(
     IProjectService projectService,
     IPageService blogService,
     IContentProcessor contentProcessor,
     IPageRoutes pageRoutes,
     IAuthorizationService authorizationService,
     ITimeZoneHelper timeZoneHelper,
     IAuthorNameResolver authorNameResolver,
     IStringLocalizer <SimpleContent> localizer,
     IOptions <PageEditOptions> pageEditOptionsAccessor,
     ILogger <PageController> logger)
 {
     ProjectService       = projectService;
     PageService          = blogService;
     ContentProcessor     = contentProcessor;
     AuthorizationService = authorizationService;
     AuthorNameResolver   = authorNameResolver;
     TimeZoneHelper       = timeZoneHelper;
     PageRoutes           = pageRoutes;
     EditOptions          = pageEditOptionsAccessor.Value;
     StringLocalizer      = localizer;
     Log = logger;
 }
        public static async Task CopyFromAsync(this HttpListenerResponse response, HttpResponseMessage message,
                                               IContentProcessor contentProcessor)
        {
            response.StatusCode = (int)message.StatusCode;
            foreach (var httpResponseHeader in message.Headers.Where(header => !Filter.Contains(header.Key)))
            {
                foreach (var value in httpResponseHeader.Value)
                {
                    response.AddHeader(httpResponseHeader.Key, value);
                }
            }
            foreach (var httpResponseHeader in message.Content.Headers.Where(header => !Filter.Contains(header.Key)))
            {
                foreach (var value in httpResponseHeader.Value)
                {
                    response.AddHeader(httpResponseHeader.Key, value);
                }
            }
            response.SendChunked = false;
            response.KeepAlive   = false;

            var bytes = await message.Content.ReadAsByteArrayAsync();

            if (bytes.Length <= 0)
            {
                return;
            }

            if (contentProcessor != null)
            {
                bytes = contentProcessor.Process(bytes, message.Content.Headers.ContentType,
                                                 message.RequestMessage.RequestUri);
            }

            response.ContentLength64 = bytes.Length;
            await response.OutputStream.WriteAsync(bytes, 0, bytes.Length);
        }
        public Config Load(string name, IContentProcessor contentProcessor)
        {
            if (!ValidationHelper.IsValidBundleName(name))
            {
                throw new ArgumentException(ValidationHelper.INVALID_NAME_MESSAGE, "name");
            }
            name = name.ToLower();
            var confDir = Path.Combine(ConfigFolder, name);

            if (!Directory.Exists(confDir))
            {
                Directory.CreateDirectory(confDir);
            }

            var conf       = new Config(contentProcessor, name);
            var files      = Directory.EnumerateFiles(confDir).Select(f => new { path = f, name = Path.GetFileName(f).ToLower() }).OrderBy(x => x.name);
            var enumerator = files.GetEnumerator();

            if (enumerator.MoveNext())
            {
                createBundles(conf, enumerator, true);
            }
            return(conf);
        }