Imported Upstream version 3.12.0

Former-commit-id: cf92446697332992ec36726e78eb8703e1f259d7
This commit is contained in:
Jo Shields
2015-01-13 10:44:36 +00:00
parent 8b9b85e7f5
commit 181b81b4a4
659 changed files with 12743 additions and 16300 deletions

View File

@ -94,6 +94,7 @@ namespace System.Diagnostics
public DiagnosticsConfigurationHandler ()
{
elementHandlers ["assert"] = new ElementHandler (AddAssertNode);
elementHandlers ["performanceCounters"] = new ElementHandler (AddPerformanceCountersNode);
elementHandlers ["switches"] = new ElementHandler (AddSwitchesNode);
elementHandlers ["trace"] = new ElementHandler (AddTraceNode);
elementHandlers ["sources"] = new ElementHandler (AddSourcesNode);
@ -181,6 +182,25 @@ namespace System.Diagnostics
ThrowUnrecognizedElement (node.ChildNodes[0]);
}
private void AddPerformanceCountersNode (IDictionary d, XmlNode node)
{
XmlAttributeCollection c = node.Attributes;
string filemappingsize = GetAttribute (c, "filemappingsize", false, node);
ValidateInvalidAttributes (c, node);
if (filemappingsize != null) {
try {
d ["filemappingsize"] = int.Parse (filemappingsize);
}
catch (Exception e) {
throw new ConfigurationException ("The `filemappingsize' attribute must be an integral value.",
e, node);
}
}
if (node.ChildNodes.Count > 0)
ThrowUnrecognizedElement (node.ChildNodes[0]);
}
// name and value attributes are required
// Docs do not define "remove" or "clear" elements, but .NET recognizes
// them