コード例 #1
0
 public SitemapRepository(
     IEnumerable <ISitemapStrategy> strategies,
     IEntryConverter converter,
     IHostBindingsService hostBindingsService,
     ICache <byte[]> cache)
 {
     if (strategies == null)
     {
         throw new ArgumentNullException("strategies");
     }
     if (converter == null)
     {
         throw new ArgumentNullException("converter");
     }
     if (hostBindingsService == null)
     {
         throw new ArgumentNullException("hostBindingsService");
     }
     if (cache == null)
     {
         throw new ArgumentNullException("cache");
     }
     _strategies          = strategies;
     _converter           = converter;
     _hostBindingsService = hostBindingsService;
     _cache = cache;
 }
コード例 #2
0
        public void Configure(XElement xml)
        {
            EntryFormatter =
                ConstructOrDefault<IEntryConverter<string>>(xml.GetAttributeValue("EntryFormatter", "Formatter"));

            var cap = xml.GetAttributeValue("cap") ?? xml.GetAttributeValue("capacity");
            Capacity = Attempt.Get<int?>(() => int.Parse(cap)).Value;
        }
コード例 #3
0
        public SitemapRepository(
			IEnumerable<ISitemapStrategy> strategies,
			IEntryConverter converter,
            IHostBindingsService hostBindingsService,
			ICache<byte[]> cache)
        {
            if (strategies == null) throw new ArgumentNullException("strategies");
            if (converter == null) throw new ArgumentNullException("converter");
            if (hostBindingsService == null) throw new ArgumentNullException("hostBindingsService");
            if (cache == null) throw new ArgumentNullException("cache");
            _strategies = strategies;
            _converter = converter;
            _hostBindingsService = hostBindingsService;
            _cache = cache;
        }
コード例 #4
0
ファイル: TraceTarget.cs プロジェクト: Core-Techs/Logging
 public void Configure(XElement xml)
 {
     EntryFormatter =
         ConstructOrDefault<IEntryConverter<string>>(xml.GetAttributeValue("EntryFormatter", "Formatter"));
 }