本文整理汇总了C#中Mono.Xml.SmallXmlParser.Parse方法的典型用法代码示例。如果您正苦于以下问题:C# SmallXmlParser.Parse方法的具体用法?C# SmallXmlParser.Parse怎么用?C# SmallXmlParser.Parse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mono.Xml.SmallXmlParser
的用法示例。
在下文中一共展示了SmallXmlParser.Parse方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadDefaultDelayedChannels
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: LoadConfig
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: ReadConfigFile
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);
}
}