public void TestAttributeRetargeting_ReturnTypeAttributes(MethodSymbol symbol) { // Verify GetReturnTypeAttributes() TestAttributeRetargeting(symbol.GetReturnTypeAttributes()); // Verify GetReturnTypeAttributes(AttributeType from Retargeted assembly) TestAttributeRetargeting( symbol .GetReturnTypeAttributes() .Where( a => TypeSymbol.Equals( a.AttributeClass, newMsCorLib_debuggerTypeProxyAttributeType, TypeCompareKind.ConsiderEverything2 ) ) ); // Verify GetReturnTypeAttributes(AttributeType from Underlying assembly) returns nothing. Shouldn't match to old attr type Assert.Empty( symbol .GetReturnTypeAttributes() .Where( a => TypeSymbol.Equals( a.AttributeClass, oldMsCorLib_debuggerTypeProxyAttributeType, TypeCompareKind.ConsiderEverything2 ) ) ); // Verify GetReturnTypeAttributes(AttributeCtor from Retargeted assembly) TestAttributeRetargeting( symbol .GetReturnTypeAttributes() .Where( a => a.AttributeConstructor == newMsCorLib_debuggerTypeProxyAttributeCtor ) ); // Verify GetReturnTypeAttributes(AttributeCtor from Underlying assembly) returns nothing. Shouldn't match to old attr type. Assert.Empty( symbol .GetReturnTypeAttributes() .Where( a => a.AttributeConstructor == oldMsCorLib_debuggerTypeProxyAttributeCtor ) ); }
public override ImmutableArray <CSharpAttributeData> GetReturnTypeAttributes() { return(this.RetargetingTranslator.GetRetargetedAttributes( _underlyingMethod.GetReturnTypeAttributes(), ref _lazyReturnTypeCustomAttributes )); }