public override void SetEndOfSendNotification(HttpWorkerRequest.EndOfSendNotification callback, object extraData) { if (this._wr != null) { this._wr.SetEndOfSendNotification(callback, extraData); } }
static HttpRuntime() { #if !TARGET_J2EE firstRun = true; try { WebConfigurationManager.Init(); #if MONOWEB_DEP SettingsMappingManager.Init(); #endif runtime_section = (HttpRuntimeSection)WebConfigurationManager.GetSection("system.web/httpRuntime"); } catch (Exception ex) { initialException = ex; } // The classes in whose constructors exceptions may be thrown, should be handled the same way QueueManager // and TraceManager are below. The constructors themselves MUST NOT throw any exceptions - we MUST be sure // the objects are created here. The exceptions will be dealt with below, in RealProcessRequest. queue_manager = new QueueManager(); if (queue_manager.HasException) { if (initialException == null) { initialException = queue_manager.InitialException; } else { Console.Error.WriteLine("Exception during QueueManager initialization:"); Console.Error.WriteLine(queue_manager.InitialException); } } trace_manager = new TraceManager(); if (trace_manager.HasException) { if (initialException == null) { initialException = trace_manager.InitialException; } else { Console.Error.WriteLine("Exception during TraceManager initialization:"); Console.Error.WriteLine(trace_manager.InitialException); } } registeredAssemblies = new SplitOrderedList <string, string> (StringComparer.Ordinal); cache = new Cache(); internalCache = new Cache(); internalCache.DependencyCache = internalCache; #endif do_RealProcessRequest = new WaitCallback(state => { try { RealProcessRequest(state); } catch {} }); end_of_send_cb = new HttpWorkerRequest.EndOfSendNotification(EndOfSend); }
public override void SetEndOfSendNotification(HttpWorkerRequest.EndOfSendNotification callback, object extraData) { if (this._endOfRequestCallback != null) { throw new InvalidOperationException(); } this._endOfRequestCallback = callback; this._endOfRequestCallbackArg = extraData; this._endOfRequestCallbackLockCount = 1; }
public virtual void SetEndOfSendNotification(HttpWorkerRequest.EndOfSendNotification callback, object extraData) { }
private void Init () { try { _cache = new Cache (); timeoutManager = new TimeoutManager (); _endOfSendCallback = new HttpWorkerRequest.EndOfSendNotification (OnEndOfSend); _handlerCallback = new AsyncCallback (OnHandlerReady); unloadDomainCallback = new WaitCallback (DoUnload); AppDomain.CurrentDomain.DomainUnload += new EventHandler (OnDomainUnload); } catch (Exception error) { _initError = error; } }
public override void SetEndOfSendNotification(HttpWorkerRequest.EndOfSendNotification callback, Object extraData) { if (_endOfRequestCallback != null) throw new InvalidOperationException(); _endOfRequestCallback = callback; _endOfRequestCallbackArg = extraData; _endOfRequestCallbackLockCount = 1; // when goes to 0 the callback is called }
static HttpRuntime() { PlatformID pid = Environment.OSVersion.Platform; runningOnWindows = ((int)pid != 128 #if NET_2_0 && pid != PlatformID.Unix && pid != PlatformID.MacOSX #endif ); if (runningOnWindows) { caseInsensitive = true; if (AppDomainAppPath != null) { isunc = new Uri(AppDomainAppPath).IsUnc; } } else { string mono_iomap = Environment.GetEnvironmentVariable("MONO_IOMAP"); if (mono_iomap != null) { if (mono_iomap == "all") { caseInsensitive = true; } else { string[] parts = mono_iomap.Split(':'); foreach (string p in parts) { if (p == "all" || p == "case") { caseInsensitive = true; break; } } } } } Type monoRuntime = Type.GetType("Mono.Runtime", false); monoVersion = null; if (monoRuntime != null) { MethodInfo mi = monoRuntime.GetMethod("GetDisplayName", BindingFlags.Static | BindingFlags.NonPublic); if (mi != null) { monoVersion = mi.Invoke(null, new object [0]) as string; } } if (monoVersion == null) { monoVersion = Environment.Version.ToString(); } #if !TARGET_J2EE firstRun = true; #if NET_2_0 try { WebConfigurationManager.Init(); #if MONOWEB_DEP SettingsMappingManager.Init(); #endif } catch (Exception ex) { initialException = ex; } #endif // The classes in whose constructors exceptions may be thrown, should be handled the same way QueueManager // and TraceManager are below. The constructors themselves MUST NOT throw any exceptions - we MUST be sure // the objects are created here. The exceptions will be dealt with below, in RealProcessRequest. queue_manager = new QueueManager(); if (queue_manager.HasException) { initialException = queue_manager.InitialException; } trace_manager = new TraceManager(); if (trace_manager.HasException) { initialException = trace_manager.InitialException; } cache = new Cache(); internalCache = new Cache(); internalCache.DependencyCache = cache; #endif do_RealProcessRequest = new WaitCallback(RealProcessRequest); end_of_send_cb = new HttpWorkerRequest.EndOfSendNotification(EndOfSend); }
public override void SetEndOfSendNotification(HttpWorkerRequest.EndOfSendNotification callback, object extraData) { _callback = callback; _callbackPayload = extraData; }
static HttpRuntime () { firstRun = true; try { WebConfigurationManager.Init (); SettingsMappingManager.Init (); runtime_section = (HttpRuntimeSection) WebConfigurationManager.GetSection ("system.web/httpRuntime"); } catch (Exception ex) { initialException = ex; } // The classes in whose constructors exceptions may be thrown, should be handled the same way QueueManager // and TraceManager are below. The constructors themselves MUST NOT throw any exceptions - we MUST be sure // the objects are created here. The exceptions will be dealt with below, in RealProcessRequest. queue_manager = new QueueManager (); if (queue_manager.HasException) { if (initialException == null) initialException = queue_manager.InitialException; else { Console.Error.WriteLine ("Exception during QueueManager initialization:"); Console.Error.WriteLine (queue_manager.InitialException); } } trace_manager = new TraceManager (); if (trace_manager.HasException) { if (initialException == null) initialException = trace_manager.InitialException; else { Console.Error.WriteLine ("Exception during TraceManager initialization:"); Console.Error.WriteLine (trace_manager.InitialException); } } registeredAssemblies = new SplitOrderedList <string, string> (StringComparer.Ordinal); cache = new Cache (); internalCache = new Cache (); internalCache.DependencyCache = internalCache; do_RealProcessRequest = new WaitCallback (state => { try { RealProcessRequest (state); } catch {} }); end_of_send_cb = new HttpWorkerRequest.EndOfSendNotification (EndOfSend); }
public override void SetEndOfSendNotification(System.Web.HttpWorkerRequest.EndOfSendNotification callback, object extraData) { _endOfSendCallback = callback; _endOfSendArgs = extraData; }
public override void SetEndOfSendNotification(HttpWorkerRequest.EndOfSendNotification callback, object extraData) { this._endSendCbFunc = callback; this._endSendData = extraData; }
public override void SetEndOfSendNotification(HttpWorkerRequest.EndOfSendNotification callback, object extraData) { this._originalWorkerRequest.SetEndOfSendNotification(callback, extraData); }
private void Init() { try { if (Environment.OSVersion.Platform != PlatformID.Win32NT) throw new PlatformNotSupportedException(System.Web.SR.GetString("RequiresNT")); this._profiler = new Profiler(); this._timeoutManager = new RequestTimeoutManager(); this._wpUserId = HttpRuntime.GetCurrentUserName(); this._requestNotificationCompletionCallback = new AsyncCallback(this.OnRequestNotificationCompletion); this._handlerCompletionCallback = new AsyncCallback(this.OnHandlerCompletion); this._asyncEndOfSendCallback = new HttpWorkerRequest.EndOfSendNotification(this.EndOfSendCallback); this._appDomainUnloadallback = new WaitCallback(this.ReleaseResourcesAndUnloadAppDomain); if (HttpRuntime.GetAppDomainString(".appDomain") != null) { this._appDomainAppId = HttpRuntime.GetAppDomainString(".appId"); this._appDomainAppPath = HttpRuntime.GetAppDomainString(".appPath"); this._appDomainAppVPath = VirtualPath.CreateNonRelativeTrailingSlash(HttpRuntime.GetAppDomainString(".appVPath")); this._appDomainId = HttpRuntime.GetAppDomainString(".domainId"); this._isOnUNCShare = System.Web.Util.StringUtil.StringStartsWith(this._appDomainAppPath, "\\\\"); PerfCounters.Open(this._appDomainAppId); } this._fcm = new FileChangesMonitor(HostingEnvironment.FcnMode); } catch (Exception ex) { HttpRuntime.InitializationException = ex; } }