Ejemplo n.º 1
0
        public static IPageGenerator Create(this IPageGenerator ignore)
        {
            var cpt           = System.IO.File.ReadAllText(_contentPageTemplatePath);
            var ppt           = System.IO.File.ReadAllText(_postPageTemplatePath);
            var styleTemplate = System.IO.File.ReadAllText(_styleTemplatePath);
            var nav           = new FakeNavProvider();

            return(ignore.Create(cpt, ppt, styleTemplate, nav));
        }
Ejemplo n.º 2
0
        public static IPageGenerator Create(this IPageGenerator ignore, TemplateType templateTypeToBeMissing)
        {
            var navProvider = new FakeNavProvider();

            var templates     = (null as IEnumerable <Template>).CreateBlankTemplates();
            var testTemplates = templates.Where(t => t.TemplateType != templateTypeToBeMissing);

            var templateProcessor = Mock.Of <ITemplateProcessor>();

            var container = (null as IServiceCollection)
                            .Create(testTemplates, navProvider, templateProcessor);

            return(ignore.Create(container));
        }
Ejemplo n.º 3
0
        public static IPageGenerator Create(this IPageGenerator ignore, String contentPageTemplate, String postPageTemplate, String stylePageTemplate, INavigationProvider navProvider)
        {
            var contentTemplate = new Template()
            {
                Content = contentPageTemplate, TemplateType = Enumerations.TemplateType.ContentPage
            };
            var postTemplate = new Template()
            {
                Content = postPageTemplate, TemplateType = Enumerations.TemplateType.PostPage
            };
            var styleTemplate = new Template()
            {
                Content = stylePageTemplate, TemplateType = Enumerations.TemplateType.Style
            };

            var templates = new List <Template>()
            {
                contentTemplate, postTemplate, styleTemplate
            };

            return(ignore.Create(templates, navProvider));
        }
Ejemplo n.º 4
0
        public static IPageGenerator Create(this IPageGenerator ignore, TemplateType templateTypeToBeMissing)
        {
            var container = new ServiceCollection();

            var settings = (null as ISettings).CreateDefault();

            container.AddSingleton <ISettings>(settings);

            var nav = new FakeNavProvider();

            container.AddSingleton <INavigationProvider>(nav);

            var templates     = (null as IEnumerable <Template>).CreateBlankTemplates();
            var testTemplates = templates.Where(t => t.TemplateType != templateTypeToBeMissing);

            container.AddSingleton <IEnumerable <Template> >(testTemplates);

            var linkProvider = Mock.Of <ILinkProvider>();

            container.AddSingleton <ILinkProvider>(linkProvider);

            return(ignore.Create(container));
        }
Ejemplo n.º 5
0
        public static IPageGenerator Create(this IPageGenerator ignore, string contentPageTemplate, string postPageTemplate, string stylePageTemplate, string dateTimeFormatSpecifier, INavigationProvider navProvider)
        {
            var contentTemplate = new Template()
            {
                Content = contentPageTemplate, TemplateType = Enumerations.TemplateType.ContentPage
            };
            var postTemplate = new Template()
            {
                Content = postPageTemplate, TemplateType = Enumerations.TemplateType.PostPage
            };
            var styleTemplate = new Template()
            {
                Content = stylePageTemplate, TemplateType = Enumerations.TemplateType.Style
            };

            var templates = new List <Template>()
            {
                contentTemplate, postTemplate, styleTemplate
            };

            var settings = (null as Settings).CreateDefault(dateTimeFormatSpecifier);

            return(ignore.Create(templates, settings, navProvider, new List <Category>()));
        }
Ejemplo n.º 6
0
 public static IPageGenerator Create(this IPageGenerator ignore, IEnumerable <Template> templates, ISettings settings, IEnumerable <Category> categories)
 {
     return(ignore.Create(templates, settings, new FakeNavProvider(), categories));
 }
Ejemplo n.º 7
0
 public static IPageGenerator Create(this IPageGenerator ignore, string contentPageTemplate, string postPageTemplate, string stylePageTemplate, string dateTimeFormatSpecifier)
 {
     return(ignore.Create(contentPageTemplate, postPageTemplate, stylePageTemplate, dateTimeFormatSpecifier, new FakeNavProvider()));
 }
Ejemplo n.º 8
0
 public static IPageGenerator Create(this IPageGenerator ignore, string contentPageTemplate, string postPageTemplate, string stylePageTemplate, INavigationProvider navProvider)
 {
     return(ignore.Create(contentPageTemplate, postPageTemplate, stylePageTemplate, _defaultDateTimeFormatSpecifier, navProvider));
 }
Ejemplo n.º 9
0
 public static IPageGenerator Create(this IPageGenerator ignore, string contentPageTemplate, string postPageTemplate, string styleTemplate)
 {
     return(ignore.Create(contentPageTemplate, postPageTemplate, styleTemplate, new FakeNavProvider()));
 }
Ejemplo n.º 10
0
        public static IPageGenerator Create(this IPageGenerator ignore, IEnumerable <Template> templates, ISettings settings, INavigationProvider navProvider, IEnumerable <Category> categories)
        {
            var container = (null as IServiceCollection).Create(templates, settings, navProvider, categories);

            return(ignore.Create(container));
        }
Ejemplo n.º 11
0
        public static IPageGenerator Create(this IPageGenerator ignore, IEnumerable <Template> templates, ITemplateProcessor templateProcessor)
        {
            var serviceCollection = (null as IServiceCollection).Create(templates, new FakeNavProvider(), templateProcessor);

            return(ignore.Create(serviceCollection));
        }
Ejemplo n.º 12
0
 public static IPageGenerator Create(this IPageGenerator ignore, IEnumerable <Template> templates)
 {
     return(ignore.Create(templates, new FakeNavProvider()));
 }