/// <summary>
 /// Initializes a new instance of the <see cref="FluentTargetConfiguration"/> class.
 /// </summary>
 /// <param name="configuration">Main configuration class.</param>
 /// <param name="name">Alias for this target</param>
 public FluentTargetConfiguration(FluentConfiguration configuration, string name)
 {
     As = new FluentTargetConfigurationTypes(this);
     Done = configuration;
     _name = name;
 }
Пример #2
0
 /// <summary>
 /// Adds a database logger.
 /// </summary>
 /// <param name="instance">fluent configuration instance.</param>
 /// <param name="appName">Application name (used to identify the messages from the current application) </param>
 /// <param name="module">Optional. Namespace/project etc. Used to identify the logging classes </param>
 /// <param name="queueName">Message queue name (read MSDN for the syntax)</param>
 /// <returns>Fluent configuration instance</returns>
 /// <remarks>
 /// The message queue must have been created before you try to use it.
 /// </remarks>
 public static FluentTargetConfiguration MessageQueue(this FluentTargetConfigurationTypes instance,
                                                      string appName, string module, string queueName)
 {
     instance.Add(new MqTarget(appName, module, queueName));
     return(instance.Done);
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FluentTargetConfiguration"/> class.
 /// </summary>
 /// <param name="configuration">Main configuration class.</param>
 /// <param name="name">Alias for this target</param>
 public FluentTargetConfiguration(FluentConfiguration configuration, string name)
 {
     As    = new FluentTargetConfigurationTypes(this);
     Done  = configuration;
     _name = name;
 }
 /// <summary>
 /// Adds a database logger.
 /// </summary>
 /// <param name="instance">fluent configuration instance.</param>
 /// <param name="connectionStringName">Name of the connection string in app/webb.config.</param>
 /// <returns>Fluent configuration instance</returns>
 /// <remarks>
 /// Use the standard .NET way to define the connection string. This code will use <see cref="ConfigurationManager"/> to find the
 /// connection string in your config file.
 /// </remarks>
 public static FluentTargetConfiguration DatabaseLogger(this FluentTargetConfigurationTypes instance,
                                                        string connectionStringName)
 {
     instance.Add(new AdoNetTarget(connectionStringName));
     return(instance.Done);
 }