コード例 #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
ファイル: CryptoConfig.cs プロジェクト: Profit0004/mono
	private static void LoadConfig (string filename, IDictionary<string,Type> algorithms, IDictionary<string,string> oid)
	{
		if (!File.Exists (filename))
			return;

		try {
			using (TextReader reader = new StreamReader (filename)) {
				CryptoHandler handler = new CryptoHandler (algorithms, oid);
				SmallXmlParser parser = new SmallXmlParser ();
				parser.Parse (reader, handler);
			}
		}
		catch {
		}
	}
コード例 #3
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);
			}
		}