Exemplo n.º 1
0
 public static Configurer WithDefaultTargetsAndRules(this Configurer @this, string logTableName, string connectionString, string mailFrom, string mailTo, bool async = true, bool disableMailInDevelop = true)
 {
     @this.WithArkDefaultTargetsAndRules(logTableName, connectionString, mailFrom, mailTo, _isProduction(), async);
     if (disableMailInDevelop)
     {
         @this.DisableMailRuleWhenInVisualStudio();
     }
     @this.ThrowInternalExceptionsInVisualStudio();
     return(@this);
 }
Exemplo n.º 2
0
        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)
        {
            var cs = new SmtpConnectionBuilder();

            cs.Server   = smtpServer;
            cs.Port     = smtpPort;
            cs.Username = smtpUserName;
            cs.Password = smtpPassword;
            cs.UseSsl   = useSsl;

            @this.WithArkDefaultTargetsAndRules(logTableName, connectionString, mailFrom, mailTo, cs.ConnectionString, _isProduction(), async);
            if (disableMailInDevelop)
            {
                @this.DisableMailRuleWhenInVisualStudio();
            }
            @this.ThrowInternalExceptionsInVisualStudio();

            return(@this);
        }