Esempio n. 1
0
 private void SinkFromFactory(SinkData sink)
 {
     LogSinkFactory factory = new LogSinkFactory(Context);
     ILogSink output = factory.CreateSink(sink.Name);
         Assert.IsNotNull(output);
 }
Esempio n. 2
0
 /// <summary>
 /// Creates node with specified configuration data.
 /// </summary>
 protected SinkNode(SinkData sinkData)
     : base()
 {
     if (sinkData == null) throw new ArgumentNullException("sinkData");
     this.sinkData = sinkData;
 }
 public TestLogSinkConfigurationView(SinkData data)
     : base(new ConfigurationContext(new ConfigurationDictionary()))
 {
     this.data = data;
 }
Esempio n. 4
0
 public TestLoggingConfigurationView(SinkData data, ConfigurationContext context)
     : base(context)
 {
     this.data = data;
 }
Esempio n. 5
0
        private DatabaseSink CreateSink(SinkData sinkData)
        {
            DatabaseSink databaseSink = new DatabaseSink();
            databaseSink.Initialize(new TestLoggingConfigurationView(sinkData, Context));

            return databaseSink;
        }
Esempio n. 6
0
 /// <summary>
 /// <para>Adds an <see cref="SinkData"/> into the collection.</para>
 /// </summary>
 /// <param name="providerData">
 /// <para>The <see cref="SinkData"/> to add. The value can not be a <see langword="null"/> reference (Nothing in Visual Basic).</para>
 /// </param>
 /// <remarks>
 /// <para>If a reference already exists in the collection by <seealso cref="ProviderData.Name"/>, it will be replaced with the new reference.</para>
 /// </remarks>
 /// <exception cref="ArgumentNullException">
 /// <para><paramref name="providerData"/> is a <see langword="null"/> reference (Nothing in Visual Basic).</para>
 /// <para>- or -</para>
 /// <para><seealso cref="ProviderData.Name"/> is a <see langword="null"/> reference (Nothing in Visual Basic).</para>
 /// </exception>
 public void Add(SinkData providerData)
 {
     AddProvider(providerData);
 }
Esempio n. 7
0
 /// <summary>
 /// <para>Adds an <see cref="SinkData"/> into the collection.</para>
 /// </summary>
 /// <param name="providerData">
 /// <para>The <see cref="SinkData"/> to add. The value can not be a <see langword="null"/> reference (Nothing in Visual Basic).</para>
 /// </param>
 /// <remarks>
 /// <para>If a reference already exists in the collection by <seealso cref="ProviderData.Name"/>, it will be replaced with the new reference.</para>
 /// </remarks>
 /// <exception cref="ArgumentNullException">
 /// <para><paramref name="providerData"/> is a <see langword="null"/> reference (Nothing in Visual Basic).</para>
 /// <para>- or -</para>
 /// <para><seealso cref="ProviderData.Name"/> is a <see langword="null"/> reference (Nothing in Visual Basic).</para>
 /// </exception>
 public void Add(SinkData providerData)
 {
     AddProvider(providerData);
 }