public CultureRssController(
     ILogger <RssController> logger,
     IEnumerable <IChannelProvider> channelProviders = null,
     IChannelProviderResolver channelResolver        = null,
     IXmlFormatter xmlFormatter = null
     ) : base(logger, channelProviders, channelResolver, xmlFormatter)
 {
 }
예제 #2
0
        public RssController(
            ILogger <RssController> logger,
            IEnumerable <IChannelProvider> channelProviders = null,
            IChannelProviderResolver channelResolver        = null,
            IXmlFormatter xmlFormatter = null
            )
        {
            Log = logger;
            ChannelProviders = channelProviders ?? new List <IChannelProvider>();
            if (channelProviders is List <IChannelProvider> )
            {
                var list = channelProviders as List <IChannelProvider>;
                if (list.Count == 0)
                {
                    list.Add(new NullChannelProvider());
                }
            }

            ChannelResolver = channelResolver ?? new DefaultChannelProviderResolver();
            XmlFormatter    = xmlFormatter ?? new DefaultXmlFormatter();
        }