Castle.Windsor.Configuration.Interpreters.XmlInterpreter.AssertNodeName C# (CSharp) Method

AssertNodeName() private static method

private static AssertNodeName ( XmlNode node, IEquatable expectedName ) : void
node System.Xml.XmlNode
expectedName IEquatable
return void
		private static void AssertNodeName(XmlNode node, IEquatable<string> expectedName)
		{
			if (expectedName.Equals(node.Name))
				return;

			String message = String.Format("Unexpected node under '{0}': Expected '{1}' but found '{2}'", expectedName,
			                               expectedName, node.Name);

			throw new Exception(message);
		}
	}