public IHttpHandler GetHttpHandler(RequestContext requestContext) { // we create httphandler only we the request map to the corresponding route. // we thus do not need to check whether the baseAddress has been added // even though Asp.Net allows duplicated routes but it picks the first match if (handler == null) { // use local lock to prevent multiple httphanders from being created lock (locker) { if (handler == null) { IHttpHandler tempHandler = new AspNetRouteServiceHttpHandler(this.baseAddress); MarkRouteAsActive(this.baseAddress); handler = tempHandler; } } } return handler; }
public IHttpHandler GetHttpHandler(RequestContext requestContext) { // we create httphandler only we the request map to the corresponding route. // we thus do not need to check whether the baseAddress has been added // even though Asp.Net allows duplicated routes but it picks the first match if (handler == null) { // use local lock to prevent multiple httphanders from being created lock (locker) { if (handler == null) { IHttpHandler tempHandler = new AspNetRouteServiceHttpHandler(this.baseAddress); MarkRouteAsActive(this.baseAddress); handler = tempHandler; } } } return(handler); }