System.Web.UI.SimpleWebHandlerParser.AddAssembliesInBin C# (CSharp) Method

AddAssembliesInBin() private method

private AddAssembliesInBin ( ) : void
return void
		void AddAssembliesInBin ()
		{
			Exception ex;
			foreach (string s in HttpApplication.BinDirectoryAssemblies) {
				ex = null;
				
				try {
					Assembly assembly = Assembly.LoadFrom (s);
					AddAssembly (assembly, true);
				} catch (FileLoadException e) {
					ex = e;
					// ignore
				} catch (BadImageFormatException e) {
					ex = e;
					// ignore
				} catch (Exception e) {
					throw new Exception ("Error while loading " + s, e);
				}
				
				if (ex != null && HttpRuntime.IsDebuggingEnabled) {
					Console.WriteLine ("**** DEBUG MODE *****");
					Console.WriteLine ("Bad assembly found in bin/. Exception (ignored):");
					Console.WriteLine (ex);
				}
			}
		}