コード例 #1
0
		internal static void LoadDefaultDelayedChannels ()
		{
			lock (channelTemplates)
			{
				if (defaultDelayedConfigRead || defaultConfigRead) return;
				
				SmallXmlParser parser = new SmallXmlParser ();
				using (TextReader rreader = new StreamReader (Environment.GetMachineConfigPath ())) {
					ConfigHandler handler = new ConfigHandler (true);
					parser.Parse (rreader, handler);
				}
				defaultDelayedConfigRead = true;
			}
		}
コード例 #2
0
		private static void ReadConfigFile (string filename)
		{
			try
			{
				SmallXmlParser parser = new SmallXmlParser ();
				using (TextReader rreader = new StreamReader (filename)) {
					ConfigHandler handler = new ConfigHandler (false);
					parser.Parse (rreader, handler);
				}
			}
			catch (Exception ex)
			{
				throw new RemotingException ("Configuration file '" + filename + "' could not be loaded: " + ex.Message, ex);
			}
		}