Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public static void Dummy()
 {
     //AOT compilation needs direct references to used types in order to compiled
     //correctly.  The types listed below are in nested generic types and need to
     //be spelled out.  However, the method doesn't actually need to be called so
     //it is private.  Furthermore, if this is not in the same assembly it doesn't
     //help the compiler.  There is no memory storage taking place here so it won't
     //affect the footprint
     var dummy  = new List <KeyValuePair <string, Document> >();
     var dummy2 = new SplitOrderedList <string, KeyValuePair <string, string> >(new GenericEqualityComparer <string>());
 }
Ejemplo n.º 3
0
 public static void Dummy()
 {
     //AOT compilation needs direct references to used types in order to compiled
     //correctly.  The types listed below are in nested generic types and need to
     //be spelled out.  However, the method doesn't actually need to be called so
     //it is private.  Furthermore, if this is not in the same assembly it doesn't 
     //help the compiler.  There is no memory storage taking place here so it won't
     //affect the footprint
     var dummy = new List<KeyValuePair<string, Document>>();
     var dummy2 = new SplitOrderedList<string, KeyValuePair<string, string>>(new GenericEqualityComparer<string>());
 }
Ejemplo n.º 4
0
 static ScriptReferenceBase()
 {
     ThisAssembly  = typeof(ScriptReferenceBase).Assembly;
     resourceCache = new SplitOrderedList <ResourceCacheEntry, bool> (EqualityComparer <ResourceCacheEntry> .Default);
 }
Ejemplo n.º 5
0
 static CompositeScriptReference()
 {
     entriesCache = new SplitOrderedList <string, List <CompositeEntry> > (StringComparer.Ordinal);
 }
Ejemplo n.º 6
0
		static ScriptReferenceBase ()
		{
			ThisAssembly = typeof (ScriptReferenceBase).Assembly;
			resourceCache = new SplitOrderedList <ResourceCacheEntry, bool> (EqualityComparer <ResourceCacheEntry>.Default);
		}
Ejemplo n.º 7
0
		static CompositeScriptReference ()
		{
			entriesCache = new SplitOrderedList <string, List <CompositeEntry>> (StringComparer.Ordinal);
		}
Ejemplo n.º 8
0
		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);
		}