internal override bool Initialize() { this.serverType = (DocumentationServerType) base.GetFromCache(typeof(DocumentationServerProtocol), base.Type); if (this.serverType == null) { lock (ServerProtocol.InternalSyncObject) { this.serverType = (DocumentationServerType) base.GetFromCache(typeof(DocumentationServerProtocol), base.Type); if (this.serverType == null) { string uri = Uri.EscapeUriString(base.Request.Url.ToString()).Replace("#", "%23"); this.serverType = new DocumentationServerType(base.Type, uri); base.AddToCache(typeof(DocumentationServerProtocol), base.Type, this.serverType); } } } WebServicesSection current = WebServicesSection.Current; if ((current.WsdlHelpGenerator.Href != null) && (current.WsdlHelpGenerator.Href.Length > 0)) { TraceMethod caller = Tracing.On ? new TraceMethod(this, "Initialize", new object[0]) : null; if (Tracing.On) { Tracing.Enter("ASP.NET", caller, new TraceMethod(typeof(PageParser), "GetCompiledPageInstance", new object[] { current.WsdlHelpGenerator.HelpGeneratorVirtualPath, current.WsdlHelpGenerator.HelpGeneratorPath, base.Context })); } this.handler = this.GetCompiledPageInstance(current.WsdlHelpGenerator.HelpGeneratorVirtualPath, current.WsdlHelpGenerator.HelpGeneratorPath, base.Context); if (Tracing.On) { Tracing.Exit("ASP.NET", caller); } } return true; }
internal override bool Initialize() { this.serverType = (DocumentationServerType)base.GetFromCache(typeof(DocumentationServerProtocol), base.Type); if (this.serverType == null) { lock (ServerProtocol.InternalSyncObject) { this.serverType = (DocumentationServerType)base.GetFromCache(typeof(DocumentationServerProtocol), base.Type); if (this.serverType == null) { string uri = Uri.EscapeUriString(base.Request.Url.ToString()).Replace("#", "%23"); this.serverType = new DocumentationServerType(base.Type, uri); base.AddToCache(typeof(DocumentationServerProtocol), base.Type, this.serverType); } } } WebServicesSection current = WebServicesSection.Current; if ((current.WsdlHelpGenerator.Href != null) && (current.WsdlHelpGenerator.Href.Length > 0)) { TraceMethod caller = Tracing.On ? new TraceMethod(this, "Initialize", new object[0]) : null; if (Tracing.On) { Tracing.Enter("ASP.NET", caller, new TraceMethod(typeof(PageParser), "GetCompiledPageInstance", new object[] { current.WsdlHelpGenerator.HelpGeneratorVirtualPath, current.WsdlHelpGenerator.HelpGeneratorPath, base.Context })); } this.handler = this.GetCompiledPageInstance(current.WsdlHelpGenerator.HelpGeneratorVirtualPath, current.WsdlHelpGenerator.HelpGeneratorPath, base.Context); if (Tracing.On) { Tracing.Exit("ASP.NET", caller); } } return(true); }
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); }
internal override bool Initialize() { // // see if we already cached a DocumentationServerType // if (null == (serverType = (DocumentationServerType)GetFromCache(typeof(DocumentationServerProtocol), Type)) && null == (serverType = (DocumentationServerType)GetFromCache(typeof(DocumentationServerProtocol), Type, true))) { lock (InternalSyncObject) { if (null == (serverType = (DocumentationServerType)GetFromCache(typeof(DocumentationServerProtocol), Type)) && null == (serverType = (DocumentationServerType)GetFromCache(typeof(DocumentationServerProtocol), Type, true))) { // // if not create a new DocumentationServerType and cache it // // bool excludeSchemeHostPortFromCachingKey = this.IsCacheUnderPressure(typeof(DocumentationServerProtocol), Type); string escapedUri = Uri.EscapeUriString(Request.Url.ToString()).Replace("#", "%23"); serverType = new DocumentationServerType(Type, escapedUri, excludeSchemeHostPortFromCachingKey); AddToCache(typeof(DocumentationServerProtocol), Type, serverType, excludeSchemeHostPortFromCachingKey); } } } WebServicesSection config = WebServicesSection.Current; if (config.WsdlHelpGenerator.Href != null && config.WsdlHelpGenerator.Href.Length > 0) { TraceMethod caller = Tracing.On ? new TraceMethod(this, "Initialize") : null; if (Tracing.On) { Tracing.Enter("ASP.NET", caller, new TraceMethod(typeof(PageParser), "GetCompiledPageInstance", config.WsdlHelpGenerator.HelpGeneratorVirtualPath, config.WsdlHelpGenerator.HelpGeneratorPath, Context)); } handler = GetCompiledPageInstance(config.WsdlHelpGenerator.HelpGeneratorVirtualPath, config.WsdlHelpGenerator.HelpGeneratorPath, Context); if (Tracing.On) { Tracing.Exit("ASP.NET", caller); } } return(true); }
internal override bool Initialize() { // // see if we already cached a DocumentationServerType // if (null == (serverType = (DocumentationServerType)GetFromCache(typeof(DocumentationServerProtocol), Type)) && null == (serverType = (DocumentationServerType)GetFromCache(typeof(DocumentationServerProtocol), Type, true))) { lock (InternalSyncObject) { if (null == (serverType = (DocumentationServerType)GetFromCache(typeof(DocumentationServerProtocol), Type)) && null == (serverType = (DocumentationServerType)GetFromCache(typeof(DocumentationServerProtocol), Type, true))) { // // if not create a new DocumentationServerType and cache it // // bool excludeSchemeHostPortFromCachingKey = this.IsCacheUnderPressure(typeof(DocumentationServerProtocol), Type); string escapedUri = RuntimeUtils.EscapeUri(Request.Url); serverType = new DocumentationServerType(Type, escapedUri, excludeSchemeHostPortFromCachingKey); AddToCache(typeof(DocumentationServerProtocol), Type, serverType, excludeSchemeHostPortFromCachingKey); } } } WebServicesSection config = WebServicesSection.Current; if (config.WsdlHelpGenerator.Href != null && config.WsdlHelpGenerator.Href.Length > 0) { TraceMethod caller = Tracing.On ? new TraceMethod(this, "Initialize") : null; if (Tracing.On) Tracing.Enter("ASP.NET", caller, new TraceMethod(typeof(PageParser), "GetCompiledPageInstance", config.WsdlHelpGenerator.HelpGeneratorVirtualPath, config.WsdlHelpGenerator.HelpGeneratorPath, Context)); handler = GetCompiledPageInstance(config.WsdlHelpGenerator.HelpGeneratorVirtualPath, config.WsdlHelpGenerator.HelpGeneratorPath, Context); if (Tracing.On) Tracing.Exit("ASP.NET", caller); } return true; }