示例#1
0
 public ItemUrlBuilder(string templateKey, ILinkTemplateLookup templateLookup)
 {
     if (string.IsNullOrWhiteSpace(templateKey))
     {
         throw new ArgumentException(nameof(templateKey));
     }
     _templateKey    = templateKey;
     _templateLookup = templateLookup ?? throw new ArgumentNullException(nameof(templateLookup));
 }
示例#2
0
 public PageUrlBuilder
 (
     string templateKey,
     ILinkTemplateLookup templateLookup,
     int pageSize
 )
 {
     if (string.IsNullOrWhiteSpace(templateKey))
     {
         throw new ArgumentException(nameof(templateKey));
     }
     _templateKey    = templateKey;
     _templateLookup = templateLookup ?? throw new ArgumentNullException(nameof(templateLookup));
     if (pageSize < 1)
     {
         throw new ArgumentException(nameof(pageSize));
     }
     take = pageSize;
 }