public override Cci.IDefinition?MapDefinition(Cci.IDefinition definition)
        {
            if (definition.GetInternalSymbol() is Symbol symbol)
            {
                return((Cci.IDefinition?)_symbols.Visit(symbol)?.GetCciAdapter());
            }

            // TODO: this appears to be dead code, remove (https://github.com/dotnet/roslyn/issues/51595)
            return(_defs.VisitDef(definition));
        }
                public bool Equals(TypeSymbol source, TypeSymbol other)
                {
                    var visitedSource = (TypeSymbol)_matcher.Visit(source);
                    var visitedOther  = (_deepTranslatorOpt != null) ? (TypeSymbol)_deepTranslatorOpt.Visit(other) : other;

                    return(visitedSource?.Equals(visitedOther, TypeCompareKind.IgnoreDynamicAndTupleNames) == true);
                }
示例#3
0
                public bool Equals(TypeSymbol source, TypeSymbol other)
                {
                    var visitedSource = (TypeSymbol)_matcher.Visit(source);
                    var visitedOther  = (_deepTranslatorOpt != null) ? (TypeSymbol)_deepTranslatorOpt.Visit(other) : other;

                    return(visitedSource?.Equals(visitedOther, ignoreDynamic: true) == true);
                }
示例#4
0
                public bool Equals(Symbol x, Symbol y)
                {
                    var other = _matcher.Visit(x);

                    Debug.Assert((object)other != null);
                    return(other == y);
                }