コード例 #1
0
 protected bool Equals(XmlDynamo other)
 {
     return Equals(Element, other.Element);
 }
コード例 #2
0
        public override bool TryGetMember(GetMemberBinder binder, out object result)
        {
            if (Element == null)
            {
                result = null;
                return false;
            }

            var child = Element.Element(binder.Name);

            if (child == null)
            {
                var attrib = Element.Attribute(binder.Name);
                if (attrib == null)
                {
                    result = null;
                    return true;
                }

                result = attrib.Value;
                return true;
            }

            result = new XmlDynamo(child);
            return true;
        }