75 references to GetAttributes
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (64)
Attributes\AttributeTests.cs (53)
2832
Assert.Equal(1, delegateType.
GetAttributes
(typeAttrType).Count());
2837
Assert.Equal(1, typeParameters[0].
GetAttributes
(typeParamAttrType).Count());
2850
Assert.Equal(1, parameters[0].
GetAttributes
(paramAttrType).Count());
2852
Assert.Equal(1, parameters[1].
GetAttributes
(paramAttrType).Count());
2854
Assert.Equal(1, parameters[2].
GetAttributes
(paramAttrType).Count());
2874
Assert.Equal(1, parameters[0].
GetAttributes
(paramAttrType).Count());
2876
Assert.Equal(1, parameters[1].
GetAttributes
(paramAttrType).Count());
2878
Assert.Equal(1, parameters[2].
GetAttributes
(paramAttrType).Count());
2879
Assert.Equal(0, parameters[3].
GetAttributes
(paramAttrType).Count());
2880
Assert.Equal(0, parameters[4].
GetAttributes
(paramAttrType).Count());
2891
Assert.Equal(1, parameters[0].
GetAttributes
(paramAttrType).Count());
2893
Assert.Equal(1, parameters[1].
GetAttributes
(paramAttrType).Count());
2894
Assert.Equal(0, parameters[2].
GetAttributes
(paramAttrType).Count());
2973
Assert.Equal(1, parameters[0].
GetAttributes
(paramAttrType).Count());
2975
Assert.Equal(1, parameters[1].
GetAttributes
(paramAttrType).Count());
2995
Assert.Equal(1, parameters[0].
GetAttributes
(paramAttrType).Count());
2997
Assert.Equal(1, parameters[1].
GetAttributes
(paramAttrType).Count());
2998
Assert.Equal(0, parameters[2].
GetAttributes
(paramAttrType).Count());
2999
Assert.Equal(0, parameters[3].
GetAttributes
(paramAttrType).Count());
3490
var attrs = method.
GetAttributes
(attributeClass);
3497
attrs = method.
GetAttributes
(attributeClass);
3504
attrs = method.
GetAttributes
(attributeClass);
3827
var attrs = enumType.
GetAttributes
(attributeType);
3830
attrs = genMethod.
GetAttributes
(attributeType2);
3864
var attrs = type.
GetAttributes
(attributeType);
3912
var attrs = field.
GetAttributes
(attributeType);
3967
var attrs = setter.
GetAttributes
(attributeTypeForMethod);
3973
attrs = setter.Parameters[0].
GetAttributes
(attributeTypeForParam);
3986
attrs = getter.
GetAttributes
(attributeTypeForMethod);
4477
var attrs = cClass.
GetAttributes
(attributeType);
4483
attrs = typeParameters[0].
GetAttributes
(attributeType);
4532
var attrs = bClass.
GetAttributes
(attributeType);
4572
var attrs = bClass.
GetAttributes
(attributeType);
4666
var attrs = attributeType.
GetAttributes
(attributeType);
4793
Assert.Equal(1, gooMethod.
GetAttributes
(a1Class).Count());
4794
Assert.Equal(1, gooMethod.
GetAttributes
(a2Class).Count());
4800
Assert.Equal(1, typeParam1.
GetAttributes
(c1Class).Count());
4801
Assert.Equal(1, typeParam1.
GetAttributes
(c2Class).Count());
4804
Assert.Equal(1, typeParam2.
GetAttributes
(d1Class).Count());
4805
Assert.Equal(1, typeParam2.
GetAttributes
(d2Class).Count());
4808
Assert.Equal(1, param.
GetAttributes
(e1Class).Count());
4809
Assert.Equal(1, param.
GetAttributes
(e2Class).Count());
4845
Assert.Equal(1, type.
GetAttributes
(aClass).Count());
4846
Assert.Equal(1, type.
GetAttributes
(bClass).Count());
4882
Assert.Equal(1, typeParameter.
GetAttributes
(aClass).Count());
4883
Assert.Equal(1, typeParameter.
GetAttributes
(bClass).Count());
4915
Assert.Equal(1, GClass.
GetAttributes
(attributeType).Count());
4918
Assert.Equal(1, enumE.
GetAttributes
(attributeType).Count());
4953
var attrs = attributeType.
GetAttributes
(attributeType);
4959
attrs = cClass.
GetAttributes
(attributeType);
5013
var attrs = cClass.
GetAttributes
(attributeTypeA);
5025
attrs = cClass.
GetAttributes
(attributeTypeB);
5073
var attrs = testClass.
GetAttributes
(attributeType);
Attributes\AttributeTests_WellKnownAttributes.cs (11)
3682
attrs = worksheetInterface.
GetAttributes
(comImportType);
3690
attrs = worksheetInterface.
GetAttributes
(comImportType);
3694
attrs = worksheetInterface.
GetAttributes
(guidType);
3697
attrs = worksheetInterface.
GetAttributes
(coClassType);
3813
attrs = worksheetInterface.
GetAttributes
(comImportType);
3821
attrs = worksheetInterface.
GetAttributes
(comImportType);
3825
attrs = worksheetInterface.
GetAttributes
(guidType);
3828
attrs = worksheetInterface.
GetAttributes
(coClassType);
5061
var attrs = attrType.
GetAttributes
(attrType);
5548
Assert.Equal(1, typeA.
GetAttributes
(windowsRuntimeImportAttrType).Count());
5612
Assert.Equal(1, method.
GetAttributes
(dynamicSecurityMethodAttrType).Count());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (11)
Symbols\Metadata\PE\LoadingAttributes.cs (6)
212
Assert.Equal(aNestedAttribute, ((CSharpAttributeData)innerC1.
GetAttributes
(aNestedAttribute).Single()).AttributeClass);
925
attrSym = assemblies[0].
GetAttributes
(attrObj1).Last();
1157
attrs = mtd.
GetAttributes
(attrObj2).ToList();
1275
var attr = prop.
GetAttributes
(resCatAttr).Single();
1278
attr = prop.
GetAttributes
(resDesAttr).Single();
1281
attr = prop.
GetAttributes
(defValAttr).Single();
Symbols\Metadata\PE\LoadingNamespacesAndTypes.cs (1)
278
Assert.Equal(0, collections.
GetAttributes
(dictionary).Count());
Symbols\Retargeting\RetargetCustomAttributes.cs (4)
106
TestAttributeRetargeting(symbol.
GetAttributes
(newMsCorLib_debuggerTypeProxyAttributeType));
109
Assert.Empty(symbol.
GetAttributes
(oldMsCorLib_debuggerTypeProxyAttributeType));
112
TestAttributeRetargeting(symbol.
GetAttributes
(newMsCorLib_debuggerTypeProxyAttributeType));
115
Assert.Empty(symbol.
GetAttributes
(oldMsCorLib_debuggerTypeProxyAttributeType));