示例#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);
        }
示例#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);
        }