public void TestFixtureSetUp()
 {
     var templateService = new TemplateService();
     var embeddedEmailResourceProvider = new EmbeddedEmailResourceProvider(
         typeof(SimpleEmailModel).Assembly,
         "Email.RazorTemplates",
         "Email.Images",
         "en-AU");
     _emailTemplateInitializer = new RazorEmailTemplateInitializer(embeddedEmailResourceProvider, templateService);
     _emailFormatter = new RazorEmailFormatter(templateService, _emailTemplateInitializer);
 }
コード例 #2
0
        public void TestFixtureSetUp()
        {
            var templateService = new TemplateService();
            var embeddedEmailResourceProvider = new EmbeddedEmailResourceProvider(
                typeof(SimpleEmailModel).Assembly,
                "Email.RazorTemplates",
                "Email.Images",
                "en-AU");

            _emailTemplateInitializer = new RazorEmailTemplateInitializer(embeddedEmailResourceProvider, templateService);
            _emailFormatter           = new RazorEmailFormatter(templateService, _emailTemplateInitializer);
        }
コード例 #3
0
 public static IEmailFormatter AnInitializedEmailFormatter()
 {
     if (initializedEmailFormatter == null)
     {
         var templateService = new TemplateService();
         var embeddedEmailResourceProvider = new EmbeddedEmailResourceProvider(
             typeof(SimpleEmailModel).Assembly,
             "Email.RazorTemplates",
             "Email.Images",
             "en-AU");
         var emailTemplateInitializer = new RazorEmailTemplateInitializer(embeddedEmailResourceProvider, templateService);
         emailTemplateInitializer.CompileTemplatesForTypesInSameNamespaceAs <SimpleEmailModel>();
         initializedEmailFormatter = new RazorEmailFormatter(templateService, emailTemplateInitializer);
     }
     return(initializedEmailFormatter);
 }
コード例 #4
0
ファイル: Given.cs プロジェクト: geffzhang/RazorSharpEmail
 public static IEmailFormatter AnInitializedEmailFormatter()
 {
     if (initializedEmailFormatter == null)
     {
         var templateService = new TemplateService();
         var embeddedEmailResourceProvider = new EmbeddedEmailResourceProvider(
                     typeof(SimpleEmailModel).Assembly,
                     "Email.RazorTemplates",
                     "Email.Images",
                     "en-AU");
         var emailTemplateInitializer = new RazorEmailTemplateInitializer(embeddedEmailResourceProvider, templateService);
         emailTemplateInitializer.CompileTemplatesForTypesInSameNamespaceAs<SimpleEmailModel>();
         initializedEmailFormatter = new RazorEmailFormatter(templateService, emailTemplateInitializer);
     }
     return initializedEmailFormatter;
 }