private void SinkFromFactory(SinkData sink) { LogSinkFactory factory = new LogSinkFactory(Context); ILogSink output = factory.CreateSink(sink.Name); Assert.IsNotNull(output); }
/// <summary> /// Factory method used to create an instance of an object implementing the <see cref="ILogSink"></see> interface. The specific /// kind of <see cref="ILogSink"></see> created depends on the configuration information used by this factory. /// </summary> /// <param name="sinkName">Configuration name for <see cref="ILogSink"></see> instance to be created</param> /// <returns>Instantiated <see cref="ILogSink"></see></returns> public ILogSink CreateSink(string sinkName) { LogSinkFactory factory = new LogSinkFactory(loggingConfigurationView.ConfigurationContext); return(factory.CreateSink(sinkName)); }