public ProcFactory Proc(PageDescriptor descriptor, ProcArgs args) { if (descriptor == null) { throw new ArgumentNullException(nameof(descriptor)); } if (args == null) { throw new ArgumentNullException(nameof(args)); } if (descriptor.DomainType == null) { throw ProcExecutionException.DomainNotFound(descriptor.PageType); } ProcCacheKey key = new ProcCacheKey(descriptor, args); return(ProcCache.Procs.GetOrAdd(key, _ => this.CreateProcFactory(descriptor, args))); }
public ProcFactory Proc(PageDescriptor descriptor, ProcArgs args) { if (descriptor == null) { throw new ArgumentNullException(nameof(descriptor)); } if (args == null) { throw new ArgumentNullException(nameof(args)); } if (descriptor.DomainType == null) { throw new ProcExecutionException($"No domain found for page type '{descriptor.PageType.GetSanitizedFullName()}'. Make sure to implement IDomain in a parent namespace."); } ProcCacheKey key = new ProcCacheKey(descriptor, args); return(ProcCache.Procs.GetOrAdd(key, _ => this.CreateProcFactory(descriptor, args))); }