Files
mono/mcs/class/System/System.Net.Configuration/NetConfigurationHandler.cs
T
Jerome Laban 32ab64c093 2003-07-14 Jerome Laban <[email protected]>
* NetConfigurationHandler.cs: New file that handles
        system.net/settings

svn path=/trunk/mcs/; revision=16216
2003-07-14 16:01:37 +00:00

32 lines
729 B
C#
Executable File

//
// System.Net.Configuration.NetConfigurationHandler.cs
//
// Authors:
// Jerome Laban ([email protected])
//
// (C) 2003 Ximian, Inc (http://www.ximian.com)
//
using System.Collections;
using System.Configuration;
using System.Xml;
namespace System.Net.Configuration
{
class NetConfigurationHandler : IConfigurationSectionHandler
{
public virtual object Create (object parent, object configContext, XmlNode section)
{
NetConfig config = new NetConfig();
XmlNode node = section.SelectSingleNode("ipv6");
if(node != null) {
XmlAttribute attrib = node.Attributes["enabled"];
if(attrib != null)
config.ipv6Enabled = String.Compare (attrib.Value, "true", true) == 0;
}
return config;
}
}
}