internal override bool Initialize()
        {
            //
            // see if we already cached a DocumentationServerType
            //
            serverType = (DocumentationServerType)GetFromCache(typeof(DocumentationServerProtocol), Type);
            if (serverType == null)
            {
                lock (Type){
                    serverType = (DocumentationServerType)GetFromCache(typeof(DocumentationServerProtocol), Type);
                    if (serverType == null)
                    {
                        //
                        // if not create a new DocumentationServerType and cache it
                        //
                        // CONSIDER, use relative urls.
                        serverType = new DocumentationServerType(Type, Request.Url.ToString());
                        AddToCache(typeof(DocumentationServerProtocol), Type, serverType);
                    }
                }
            }

            WebServicesConfiguration config = WebServicesConfiguration.Current;

            if (config.WsdlHelpGeneratorPath != null)
            {
                handler = PageParser.GetCompiledPageInstance(config.WsdlHelpGeneratorVirtualPath,
                                                             config.WsdlHelpGeneratorPath,
                                                             Context);
            }
            return(true);
        }
Пример #2
0
 public Handler(
     IMediator mediator,
     WebServicesConfiguration webServices,
     IHttpService httpService)
 {
     _mediator    = mediator;
     _webServices = webServices;
     _httpService = httpService;
     LoadWebService();
 }