4 overrides of GetReturnTypeAttributes
Microsoft.CodeAnalysis.CSharp (4)
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
1036public override ImmutableArray<CSharpAttributeData> GetReturnTypeAttributes() => Signature.ReturnParam.GetAttributes();
Symbols\Retargeting\RetargetingMethodSymbol.cs (1)
222public override ImmutableArray<CSharpAttributeData> GetReturnTypeAttributes()
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
317public override ImmutableArray<CSharpAttributeData> GetReturnTypeAttributes()
Symbols\SubstitutedMethodSymbol.cs (1)
210public override ImmutableArray<CSharpAttributeData> GetReturnTypeAttributes()
109 references to GetReturnTypeAttributes
Microsoft.CodeAnalysis.CSharp (7)
Compiler\ClsComplianceChecker.cs (2)
584CheckForAttributeWithArrayArgumentInternal(((MethodSymbol)symbol).GetReturnTypeAttributes()); 698if (TryGetClsComplianceAttributeLocation(method.GetReturnTypeAttributes(), method, out attributeLocation))
Emitter\Model\MethodSymbolAdapter.cs (1)
509ImmutableArray<CSharpAttributeData> userDefined = AdaptedMethodSymbol.GetReturnTypeAttributes();
Lowering\SynthesizedMethodBaseSymbol.cs (1)
172return InheritsBaseMethodAttributes ? BaseMethod.GetReturnTypeAttributes() : ImmutableArray<CSharpAttributeData>.Empty;
Symbols\PublicModel\MethodSymbol.cs (1)
267return _underlying.GetReturnTypeAttributes().Cast<CSharpAttributeData, AttributeData>();
Symbols\Retargeting\RetargetingMethodSymbol.cs (1)
224return this.RetargetingTranslator.GetRetargetedAttributes(_underlyingMethod.GetReturnTypeAttributes(), ref _lazyReturnTypeCustomAttributes);
Symbols\SubstitutedMethodSymbol.cs (1)
212return this.OriginalDefinition.GetReturnTypeAttributes();
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (7)
CodeGen\CodeGenDynamicTests.cs (1)
690var attributes = ((MethodSymbol)member).GetReturnTypeAttributes();
CodeGen\CodeGenLocalFunctionTests.cs (6)
5242var attrs2 = localFn2.GetReturnTypeAttributes(); 5362Assert.Empty(localFn1.GetReturnTypeAttributes()); 5396Assert.Equal("DynamicAttribute", localFn1.GetReturnTypeAttributes().Single().AttributeClass.Name); 5429Assert.Empty(localFn1.GetReturnTypeAttributes()); 5637Assert.Equal(new[] { "Attr" }, GetAttributeNames(localFn1.GetReturnTypeAttributes())); 5648Assert.Empty(localFn1.GetReturnTypeAttributes());
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (74)
Attributes\AttributeTests.cs (16)
2657Assert.Equal("JJ", event10.AddMethod.GetReturnTypeAttributes().Single().AttributeClass.Name); 2845Assert.Equal(1, invokeMethod.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, returnTypeAttrType, TypeCompareKind.ConsiderEverything2)).Count()); 2860Assert.Equal(0, ctor.GetReturnTypeAttributes().Length); 2870Assert.Equal(0, beginInvokeMethod.GetReturnTypeAttributes().Length); 2887Assert.Equal(1, endInvokeMethod.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, returnTypeAttrType, TypeCompareKind.ConsiderEverything2)).Count()); 3751var attrs = getter.GetReturnTypeAttributes(); 3757attrs = setter.GetReturnTypeAttributes(); 3763attrs = method.GetReturnTypeAttributes(); 3772attrs = invokeMethod.GetReturnTypeAttributes(); 3778attrs = ctor.GetReturnTypeAttributes(); 3782attrs = beginInvokeMethod.GetReturnTypeAttributes(); 3786attrs = endInvokeMethod.GetReturnTypeAttributes(); 3978attrs = setter.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, attributeTypeForReturn, TypeCompareKind.ConsiderEverything2)); 3991attrs = getter.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, attributeTypeForReturn, TypeCompareKind.ConsiderEverything2)); 4796Assert.Equal(1, gooMethod.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, b1Class, TypeCompareKind.ConsiderEverything2)).Count()); 4797Assert.Equal(1, gooMethod.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, b2Class, TypeCompareKind.ConsiderEverything2)).Count());
Attributes\AttributeTests_Conditional.cs (4)
147attributesArrayBuilder.Add(methodM.GetReturnTypeAttributes()); 158attributesArrayBuilder.Add(propGetMethod.GetReturnTypeAttributes()); 167attributesArrayBuilder.Add(propGetMethod.GetReturnTypeAttributes()); 173attributesArrayBuilder.Add(propGetMethod.GetReturnTypeAttributes());
Attributes\AttributeTests_Dynamic.cs (13)
334ValidateDynamicAttribute(f1.GetReturnTypeAttributes(), expectedDynamicAttribute: true); 344ValidateDynamicAttribute(f2.GetReturnTypeAttributes(), expectedDynamicAttribute: true); 355ValidateDynamicAttribute(f3.GetReturnTypeAttributes(), expectedDynamicAttribute: true, expectedTransformFlags: _expectedTransformFlags); 366ValidateDynamicAttribute(f4.GetReturnTypeAttributes(), expectedDynamicAttribute: true, expectedTransformFlags: _expectedTransformFlags); 377ValidateDynamicAttribute(f5.GetReturnTypeAttributes(), expectedDynamicAttribute: true, expectedTransformFlags: _expectedTransformFlags); 391ValidateDynamicAttribute(prop1.GetMethod.GetReturnTypeAttributes(), expectedDynamicAttribute: true); 402ValidateDynamicAttribute(prop2.GetMethod.GetReturnTypeAttributes(), expectedDynamicAttribute: true, expectedTransformFlags: _expectedTransformFlags); 422ValidateDynamicAttribute(indexer.GetMethod.GetReturnTypeAttributes(), expectedDynamicAttribute: true); 430ValidateDynamicAttribute(indexer.SetMethod.GetReturnTypeAttributes(), expectedDynamicAttribute: false); 471ValidateDynamicAttribute(ctor.GetReturnTypeAttributes(), expectedDynamicAttribute: false); 487ValidateDynamicAttribute(invokeMethod.GetReturnTypeAttributes(), expectedDynamicAttribute: true, expectedTransformFlags: expectedTransformFlags); 499ValidateDynamicAttribute(beginInvokeMethod.GetReturnTypeAttributes(), expectedDynamicAttribute: false); 515ValidateDynamicAttribute(endInvokeMethod.GetReturnTypeAttributes(), expectedDynamicAttribute: true, expectedTransformFlags: expectedTransformFlags);
Attributes\AttributeTests_NativeInteger.cs (2)
1085AssertNativeIntegerAttribute(method.GetReturnTypeAttributes()); 1132AssertNativeIntegerAttribute(method.GetReturnTypeAttributes());
Attributes\AttributeTests_Nullable.cs (6)
2171AssertNullableAttribute(method.GetReturnTypeAttributes()); 2224AssertAttributes(method.GetReturnTypeAttributes()); 2277AssertNullableAttribute(method.GetReturnTypeAttributes()); 2510AssertNullableAttribute(method.GetReturnTypeAttributes()); 2537AssertNullableAttribute(method.GetReturnTypeAttributes()); 2563AssertNullableAttribute(method.GetReturnTypeAttributes());
Attributes\AttributeTests_RefReadOnly.cs (26)
45Assert.Empty(method.GetReturnTypeAttributes()); 95Assert.Empty(method.GetReturnTypeAttributes()); 127Assert.Empty(method.GetReturnTypeAttributes()); 508Assert.Empty(method.GetReturnTypeAttributes()); 539Assert.Empty(method.GetReturnTypeAttributes()); 568Assert.Empty(method.GetReturnTypeAttributes()); 605Assert.Empty(method.GetReturnTypeAttributes()); 655Assert.Empty(method.GetReturnTypeAttributes()); 693Assert.Empty(method.GetReturnTypeAttributes()); 732Assert.Empty(method.GetReturnTypeAttributes()); 786Assert.Empty(method.GetReturnTypeAttributes()); 826Assert.Empty(method.GetReturnTypeAttributes()); 1309Assert.Empty(method.GetReturnTypeAttributes()); 1346Assert.Empty(method.GetReturnTypeAttributes()); 1592Assert.Empty(method.GetReturnTypeAttributes()); 1634Assert.Empty(method.GetReturnTypeAttributes()); 1678Assert.Empty(method.GetReturnTypeAttributes()); 1727Assert.Empty(method.GetReturnTypeAttributes()); 1774Assert.Empty(method.GetReturnTypeAttributes()); 1818Assert.Empty(method.GetReturnTypeAttributes()); 1867Assert.Empty(method.GetReturnTypeAttributes()); 1907Assert.Empty(method.GetReturnTypeAttributes()); 1976Assert.Empty(method.GetReturnTypeAttributes()); 2025Assert.Empty(method.GetReturnTypeAttributes()); 2065Assert.Empty(method.GetReturnTypeAttributes()); 2107Assert.Empty(method.GetReturnTypeAttributes());
Attributes\AttributeTests_Synthesized.cs (2)
583Assert.Empty(baseMethodWrapper.GetReturnTypeAttributes()); 626Assert.Empty(baseMethodWrapper.GetReturnTypeAttributes());
Attributes\AttributeTests_Tuples.cs (5)
529ValidateTupleNameAttribute(method1.GetReturnTypeAttributes(), 543ValidateTupleNameAttribute(method3.GetReturnTypeAttributes(), 554ValidateTupleNameAttribute(method4.GetReturnTypeAttributes(), 569ValidateTupleNameAttribute(method5.GetReturnTypeAttributes(), expectedTupleNamesAttribute: false); 582ValidateTupleNameAttribute(method6.GetReturnTypeAttributes(), expectedTupleNamesAttribute: true, expectedElementNames: expectedElementNames);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Semantics\LambdaTests.cs (1)
3629return format(expr, method.GetAttributes(), method.GetReturnTypeAttributes(), method.Parameters.SelectMany(p => p.GetAttributes()));
Semantics\NullableReferenceTypesTests.cs (5)
28266var getterReturnAttributes = getter.GetReturnTypeAttributes().Select(a => a.ToString()); 28289var setterReturnAttributes = setter.GetReturnTypeAttributes(); 28369var getterReturnAttributes = getter.GetReturnTypeAttributes().Select(a => a.ToString()); 38931var setterReturnAttributes = setter.GetReturnTypeAttributes(); 45880var getterReturnAttributes = getter.GetReturnTypeAttributes().Select(a => a.ToString());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (13)
Symbols\ExtendedPartialMethodsTests.cs (3)
1909Assert.Equal(expectedAttributeNames, GetAttributeNames(definitionPart.GetReturnTypeAttributes())); 1914Assert.Equal(expectedAttributeNames, GetAttributeNames(implementationPart.GetReturnTypeAttributes())); 1922Assert.Equal(expectedAttributeNames, GetAttributeNames(method.GetReturnTypeAttributes()));
Symbols\Metadata\PE\LoadingAttributes.cs (5)
388var attr = property1.GetMethod.GetReturnTypeAttributes().First(); 391Assert.Equal(0, property1.SetMethod.GetReturnTypeAttributes().Length); 394attr = function1.GetReturnTypeAttributes().First(); 398Assert.Equal(0, sub1.GetReturnTypeAttributes().Length); 995attrSym = mtd.GetReturnTypeAttributes().First();
Symbols\Retargeting\RetargetCustomAttributes.cs (5)
124TestAttributeRetargeting(symbol.GetReturnTypeAttributes()); 127TestAttributeRetargeting(symbol.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, newMsCorLib_debuggerTypeProxyAttributeType, TypeCompareKind.ConsiderEverything2))); 130Assert.Empty(symbol.GetReturnTypeAttributes().Where(a => TypeSymbol.Equals(a.AttributeClass, oldMsCorLib_debuggerTypeProxyAttributeType, TypeCompareKind.ConsiderEverything2))); 133TestAttributeRetargeting(symbol.GetReturnTypeAttributes().Where(a => a.AttributeConstructor == newMsCorLib_debuggerTypeProxyAttributeCtor)); 136Assert.Empty(symbol.GetReturnTypeAttributes().Where(a => a.AttributeConstructor == oldMsCorLib_debuggerTypeProxyAttributeCtor));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
NullableAttributesVisitor.cs (1)
64var nullableAttribute = GetNullableAttribute((symbol is MethodSymbol method) ? method.GetReturnTypeAttributes() : symbol.GetAttributes());
TestAttributesVisitor.cs (1)
141var attribute = GetTargetAttribute((symbol is MethodSymbol method) ? method.GetReturnTypeAttributes() : symbol.GetAttributes());