Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }