public PageFolderDescriptor(PageAreaDescriptor area, string name)
 {
     Area    = area ?? throw new ArgumentNullException(nameof(area));
     Name    = name ?? throw new ArgumentNullException(nameof(name));
     Pages   = new KeyedCollection <PageDescriptor>(page => new { page.Name, page.PageHandler, Parameters = string.Join(",", page.Parameters.Select(param => param.Type.TrimEnd('?'))) });
     Folders = new KeyedCollection <PageFolderDescriptor>(folder => folder.Name);
 }
Exemple #2
0
 public PageDescriptor(PageAreaDescriptor area, string name, string pageHandler = null, List <ParameterDescriptor> parameters = null)
 {
     Area        = area ?? throw new ArgumentNullException(nameof(area));
     Name        = name ?? throw new ArgumentNullException(nameof(name));
     PageHandler = string.IsNullOrWhiteSpace(pageHandler) ? null : pageHandler;
     Parameters  = parameters ?? new List <ParameterDescriptor>();
 }