public override TraceListener Assemble(IBuilderContext context, TraceListenerData objectConfiguration, IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache)
        {
            WeblogEmailTraceListenerData castedObjectConfiguration = (WeblogEmailTraceListenerData)objectConfiguration;

            ILogFormatter formatter = GetFormatter(context, castedObjectConfiguration.Formatter, configurationSource, reflectionCache);

            TraceListener createdObject = new WeblogEmailTraceListener(castedObjectConfiguration.ToAddress, castedObjectConfiguration.FromAddress, castedObjectConfiguration.SubjectLineStarter, castedObjectConfiguration.SubjectLineEnder, castedObjectConfiguration.SmtpServer, castedObjectConfiguration.SmtpPort, castedObjectConfiguration.EnableSsl, castedObjectConfiguration.UserName, castedObjectConfiguration.Password, formatter);

            return(createdObject);
        }
Esempio n. 2
0
 public WeblogEmailMessage(string toAddress, string fromAddress, string subjectLineStarter, string subjectLineEnder, string smtpServer, int smtpPort, bool enableSsl, string userName, string password, string message, ILogFormatter formatter) : base(toAddress, fromAddress, subjectLineStarter, subjectLineEnder, smtpServer, smtpPort, message, formatter)
 {
     _configuration = new WeblogEmailTraceListenerData
     {
         SmtpServer = smtpServer,
         SmtpPort   = smtpPort,
         EnableSsl  = enableSsl,
         UserName   = userName,
         Password   = password
     };
 }
Esempio n. 3
0
 public WeblogEmailMessage(WeblogEmailTraceListenerData configuration, LogEntry logEntry, ILogFormatter formatter) : base(configuration, logEntry, formatter)
 {
     _configuration = configuration;
 }