public static Configurer WithDefaultTargetsAndRules(this Configurer @this, string logTableName, string connectionString, string mailTo, bool async = true, bool disableMailInDevelop = true) { @this.WithDefaultTargets(logTableName, connectionString, mailTo, async); @this.WithDefaultRules(); if (disableMailInDevelop) { @this.DisableMailRuleWhenInVisualStudio(); } @this.ThrowInternalExceptionsInVisualStudio(); return(@this); }
public static Configurer WithDefaultTargets(this Configurer @this, string logTableName, string connectionString, string mailFrom, string mailTo, string smtpServer, int smtpPort, string smtpUserName, string smtpPassword, bool useSsl, bool async = true) { var smtp = new SmtpConnectionBuilder(); smtp.Server = smtpServer; smtp.Port = smtpPort; smtp.Username = smtpUserName; smtp.Password = smtpPassword; smtp.UseSsl = useSsl; return(@this.WithDefaultTargets(logTableName, connectionString, mailFrom, mailTo, smtp.ConnectionString, async)); }
public static Configurer WithDefaultTargetsAndRules(this Configurer @this, string logTableName, string connectionString, string mailFrom, string mailTo, string smtpServer, int smtpPort, string smtpUserName, string smtpPassword, bool useSsl, bool async = true, bool disableMailInDevelop = true) { @this.WithDefaultTargets(logTableName, connectionString, mailFrom, mailTo, smtpServer, smtpPort, smtpUserName, smtpPassword, useSsl, async); @this.WithDefaultRules(); if (disableMailInDevelop) { @this.DisableMailRuleWhenInVisualStudio(); } @this.ThrowInternalExceptionsInVisualStudio(); return(@this); }