75 references to GetAttributes
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (64)
Attributes\AttributeTests.cs (53)
2870
Assert.Equal(1, delegateType.
GetAttributes
(typeAttrType).Count());
2875
Assert.Equal(1, typeParameters[0].
GetAttributes
(typeParamAttrType).Count());
2888
Assert.Equal(1, parameters[0].
GetAttributes
(paramAttrType).Count());
2890
Assert.Equal(1, parameters[1].
GetAttributes
(paramAttrType).Count());
2892
Assert.Equal(1, parameters[2].
GetAttributes
(paramAttrType).Count());
2912
Assert.Equal(1, parameters[0].
GetAttributes
(paramAttrType).Count());
2914
Assert.Equal(1, parameters[1].
GetAttributes
(paramAttrType).Count());
2916
Assert.Equal(1, parameters[2].
GetAttributes
(paramAttrType).Count());
2917
Assert.Equal(0, parameters[3].
GetAttributes
(paramAttrType).Count());
2918
Assert.Equal(0, parameters[4].
GetAttributes
(paramAttrType).Count());
2929
Assert.Equal(1, parameters[0].
GetAttributes
(paramAttrType).Count());
2931
Assert.Equal(1, parameters[1].
GetAttributes
(paramAttrType).Count());
2932
Assert.Equal(0, parameters[2].
GetAttributes
(paramAttrType).Count());
3011
Assert.Equal(1, parameters[0].
GetAttributes
(paramAttrType).Count());
3013
Assert.Equal(1, parameters[1].
GetAttributes
(paramAttrType).Count());
3033
Assert.Equal(1, parameters[0].
GetAttributes
(paramAttrType).Count());
3035
Assert.Equal(1, parameters[1].
GetAttributes
(paramAttrType).Count());
3036
Assert.Equal(0, parameters[2].
GetAttributes
(paramAttrType).Count());
3037
Assert.Equal(0, parameters[3].
GetAttributes
(paramAttrType).Count());
3530
var attrs = method.
GetAttributes
(attributeClass);
3537
attrs = method.
GetAttributes
(attributeClass);
3544
attrs = method.
GetAttributes
(attributeClass);
3869
var attrs = enumType.
GetAttributes
(attributeType);
3872
attrs = genMethod.
GetAttributes
(attributeType2);
3906
var attrs = type.
GetAttributes
(attributeType);
3954
var attrs = field.
GetAttributes
(attributeType);
4009
var attrs = setter.
GetAttributes
(attributeTypeForMethod);
4015
attrs = setter.Parameters[0].
GetAttributes
(attributeTypeForParam);
4028
attrs = getter.
GetAttributes
(attributeTypeForMethod);
4519
var attrs = cClass.
GetAttributes
(attributeType);
4525
attrs = typeParameters[0].
GetAttributes
(attributeType);
4574
var attrs = bClass.
GetAttributes
(attributeType);
4614
var attrs = bClass.
GetAttributes
(attributeType);
4964
var attrs = attributeType.
GetAttributes
(attributeType);
5091
Assert.Equal(1, gooMethod.
GetAttributes
(a1Class).Count());
5092
Assert.Equal(1, gooMethod.
GetAttributes
(a2Class).Count());
5098
Assert.Equal(1, typeParam1.
GetAttributes
(c1Class).Count());
5099
Assert.Equal(1, typeParam1.
GetAttributes
(c2Class).Count());
5102
Assert.Equal(1, typeParam2.
GetAttributes
(d1Class).Count());
5103
Assert.Equal(1, typeParam2.
GetAttributes
(d2Class).Count());
5106
Assert.Equal(1, param.
GetAttributes
(e1Class).Count());
5107
Assert.Equal(1, param.
GetAttributes
(e2Class).Count());
5143
Assert.Equal(1, type.
GetAttributes
(aClass).Count());
5144
Assert.Equal(1, type.
GetAttributes
(bClass).Count());
5180
Assert.Equal(1, typeParameter.
GetAttributes
(aClass).Count());
5181
Assert.Equal(1, typeParameter.
GetAttributes
(bClass).Count());
5213
Assert.Equal(1, GClass.
GetAttributes
(attributeType).Count());
5216
Assert.Equal(1, enumE.
GetAttributes
(attributeType).Count());
5251
var attrs = attributeType.
GetAttributes
(attributeType);
5257
attrs = cClass.
GetAttributes
(attributeType);
5311
var attrs = cClass.
GetAttributes
(attributeTypeA);
5323
attrs = cClass.
GetAttributes
(attributeTypeB);
5371
var attrs = testClass.
GetAttributes
(attributeType);
Attributes\AttributeTests_WellKnownAttributes.cs (11)
3763
attrs = worksheetInterface.
GetAttributes
(comImportType);
3771
attrs = worksheetInterface.
GetAttributes
(comImportType);
3775
attrs = worksheetInterface.
GetAttributes
(guidType);
3778
attrs = worksheetInterface.
GetAttributes
(coClassType);
3894
attrs = worksheetInterface.
GetAttributes
(comImportType);
3902
attrs = worksheetInterface.
GetAttributes
(comImportType);
3906
attrs = worksheetInterface.
GetAttributes
(guidType);
3909
attrs = worksheetInterface.
GetAttributes
(coClassType);
5150
var attrs = attrType.
GetAttributes
(attrType);
5637
Assert.Equal(1, typeA.
GetAttributes
(windowsRuntimeImportAttrType).Count());
5701
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)
107
TestAttributeRetargeting(symbol.
GetAttributes
(newMsCorLib_debuggerTypeProxyAttributeType));
110
Assert.Empty(symbol.
GetAttributes
(oldMsCorLib_debuggerTypeProxyAttributeType));
113
TestAttributeRetargeting(symbol.
GetAttributes
(newMsCorLib_debuggerTypeProxyAttributeType));
116
Assert.Empty(symbol.
GetAttributes
(oldMsCorLib_debuggerTypeProxyAttributeType));