コード例 #1
0
        protected internal override bool DoMatch(AstNode other, ICSharpCode.NRefactory.PatternMatching.Match match)
        {
            DocumentationReference o = other as DocumentationReference;

            if (!(o != null && this.SymbolKind == o.SymbolKind && this.HasParameterList == o.HasParameterList))
            {
                return(false);
            }
            if (this.SymbolKind == SymbolKind.Operator)
            {
                if (this.OperatorType != o.OperatorType)
                {
                    return(false);
                }
                if (this.OperatorType == OperatorType.Implicit || this.OperatorType == OperatorType.Explicit)
                {
                    if (!this.ConversionOperatorReturnType.DoMatch(o.ConversionOperatorReturnType, match))
                    {
                        return(false);
                    }
                }
            }
            else if (this.SymbolKind == SymbolKind.None)
            {
                if (!MatchString(this.MemberName, o.MemberName))
                {
                    return(false);
                }
                if (!this.TypeArguments.DoMatch(o.TypeArguments, match))
                {
                    return(false);
                }
            }
            return(this.Parameters.DoMatch(o.Parameters, match));
        }
コード例 #2
0
 void IAstVisitor.VisitDocumentationReference(DocumentationReference documentationReference)
 {
     Visit(EnterDocumentationReference, LeaveDocumentationReference, documentationReference);
 }