コード例 #1
0
        public DocumentNode EvaluateExpression(DocumentNodePath context, DocumentNode expression)
        {
            DocumentCompositeNode documentCompositeNode  = expression as DocumentCompositeNode;
            DocumentCompositeNode documentCompositeNode1 = documentCompositeNode;

            if (documentCompositeNode == null)
            {
                DocumentPrimitiveNode documentPrimitiveNode  = expression as DocumentPrimitiveNode;
                DocumentPrimitiveNode documentPrimitiveNode1 = documentPrimitiveNode;
                if (documentPrimitiveNode != null)
                {
                    DocumentNodeReferenceValue value = documentPrimitiveNode1.Value as DocumentNodeReferenceValue;
                    if (value != null)
                    {
                        return(value.Value);
                    }
                }
            }
            else
            {
                if (DocumentNodeUtilities.IsTemplateBinding(documentCompositeNode1))
                {
                    return(this.EvaluateTemplateBinding(context, documentCompositeNode1));
                }
                if (documentCompositeNode1.Type.IsResource)
                {
                    DocumentNode resourceKey = ResourceNodeHelper.GetResourceKey(documentCompositeNode1);
                    if (resourceKey != null)
                    {
                        return(this.EvaluateResource(context, ResourceNodeHelper.GetResourceType(documentCompositeNode1), resourceKey));
                    }
                }
            }
            return(expression);
        }
コード例 #2
0
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            DocumentNodeReferenceValue documentNodeReferenceValue = obj as DocumentNodeReferenceValue;

            if (documentNodeReferenceValue == null)
            {
                return(false);
            }
            return(documentNodeReferenceValue.@value == this.@value);
        }