public string Attribute(DomName name) { if (name == null) { throw new ArgumentNullException(nameof(name)); } if (Attributes == null) { Traceables.IgnoredAttributes(); return(null); } var attr = Attributes[name]; return(attr == null ? null : attr.Value); }
public string Attribute(string name) { if (name == null) { throw new ArgumentNullException(nameof(name)); } if (name.Length == 0) { throw Failure.EmptyString(nameof(name)); } if (Attributes == null) { Traceables.IgnoredAttributes(); return(null); } var attr = Attributes[name]; return(attr == null ? null : attr.Value); }