mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 11:21:39 -10:00
* NetConfigurationHandler.cs: New file that handles
system.net/settings
svn path=/trunk/mcs/; revision=16216
32 lines
729 B
C#
Executable File
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;
|
|
}
|
|
}
|
|
} |