75 references to GetAttributes
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (64)
Attributes\AttributeTests.cs (53)
2870Assert.Equal(1, delegateType.GetAttributes(typeAttrType).Count()); 2875Assert.Equal(1, typeParameters[0].GetAttributes(typeParamAttrType).Count()); 2888Assert.Equal(1, parameters[0].GetAttributes(paramAttrType).Count()); 2890Assert.Equal(1, parameters[1].GetAttributes(paramAttrType).Count()); 2892Assert.Equal(1, parameters[2].GetAttributes(paramAttrType).Count()); 2912Assert.Equal(1, parameters[0].GetAttributes(paramAttrType).Count()); 2914Assert.Equal(1, parameters[1].GetAttributes(paramAttrType).Count()); 2916Assert.Equal(1, parameters[2].GetAttributes(paramAttrType).Count()); 2917Assert.Equal(0, parameters[3].GetAttributes(paramAttrType).Count()); 2918Assert.Equal(0, parameters[4].GetAttributes(paramAttrType).Count()); 2929Assert.Equal(1, parameters[0].GetAttributes(paramAttrType).Count()); 2931Assert.Equal(1, parameters[1].GetAttributes(paramAttrType).Count()); 2932Assert.Equal(0, parameters[2].GetAttributes(paramAttrType).Count()); 3011Assert.Equal(1, parameters[0].GetAttributes(paramAttrType).Count()); 3013Assert.Equal(1, parameters[1].GetAttributes(paramAttrType).Count()); 3033Assert.Equal(1, parameters[0].GetAttributes(paramAttrType).Count()); 3035Assert.Equal(1, parameters[1].GetAttributes(paramAttrType).Count()); 3036Assert.Equal(0, parameters[2].GetAttributes(paramAttrType).Count()); 3037Assert.Equal(0, parameters[3].GetAttributes(paramAttrType).Count()); 3530var attrs = method.GetAttributes(attributeClass); 3537attrs = method.GetAttributes(attributeClass); 3544attrs = method.GetAttributes(attributeClass); 3869var attrs = enumType.GetAttributes(attributeType); 3872attrs = genMethod.GetAttributes(attributeType2); 3906var attrs = type.GetAttributes(attributeType); 3954var attrs = field.GetAttributes(attributeType); 4009var attrs = setter.GetAttributes(attributeTypeForMethod); 4015attrs = setter.Parameters[0].GetAttributes(attributeTypeForParam); 4028attrs = getter.GetAttributes(attributeTypeForMethod); 4519var attrs = cClass.GetAttributes(attributeType); 4525attrs = typeParameters[0].GetAttributes(attributeType); 4574var attrs = bClass.GetAttributes(attributeType); 4614var attrs = bClass.GetAttributes(attributeType); 4964var attrs = attributeType.GetAttributes(attributeType); 5091Assert.Equal(1, gooMethod.GetAttributes(a1Class).Count()); 5092Assert.Equal(1, gooMethod.GetAttributes(a2Class).Count()); 5098Assert.Equal(1, typeParam1.GetAttributes(c1Class).Count()); 5099Assert.Equal(1, typeParam1.GetAttributes(c2Class).Count()); 5102Assert.Equal(1, typeParam2.GetAttributes(d1Class).Count()); 5103Assert.Equal(1, typeParam2.GetAttributes(d2Class).Count()); 5106Assert.Equal(1, param.GetAttributes(e1Class).Count()); 5107Assert.Equal(1, param.GetAttributes(e2Class).Count()); 5143Assert.Equal(1, type.GetAttributes(aClass).Count()); 5144Assert.Equal(1, type.GetAttributes(bClass).Count()); 5180Assert.Equal(1, typeParameter.GetAttributes(aClass).Count()); 5181Assert.Equal(1, typeParameter.GetAttributes(bClass).Count()); 5213Assert.Equal(1, GClass.GetAttributes(attributeType).Count()); 5216Assert.Equal(1, enumE.GetAttributes(attributeType).Count()); 5251var attrs = attributeType.GetAttributes(attributeType); 5257attrs = cClass.GetAttributes(attributeType); 5311var attrs = cClass.GetAttributes(attributeTypeA); 5323attrs = cClass.GetAttributes(attributeTypeB); 5371var attrs = testClass.GetAttributes(attributeType);
Attributes\AttributeTests_WellKnownAttributes.cs (11)
3763attrs = worksheetInterface.GetAttributes(comImportType); 3771attrs = worksheetInterface.GetAttributes(comImportType); 3775attrs = worksheetInterface.GetAttributes(guidType); 3778attrs = worksheetInterface.GetAttributes(coClassType); 3894attrs = worksheetInterface.GetAttributes(comImportType); 3902attrs = worksheetInterface.GetAttributes(comImportType); 3906attrs = worksheetInterface.GetAttributes(guidType); 3909attrs = worksheetInterface.GetAttributes(coClassType); 5150var attrs = attrType.GetAttributes(attrType); 5637Assert.Equal(1, typeA.GetAttributes(windowsRuntimeImportAttrType).Count()); 5701Assert.Equal(1, method.GetAttributes(dynamicSecurityMethodAttrType).Count());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (11)
Symbols\Metadata\PE\LoadingAttributes.cs (6)
212Assert.Equal(aNestedAttribute, ((CSharpAttributeData)innerC1.GetAttributes(aNestedAttribute).Single()).AttributeClass); 925attrSym = assemblies[0].GetAttributes(attrObj1).Last(); 1157attrs = mtd.GetAttributes(attrObj2).ToList(); 1275var attr = prop.GetAttributes(resCatAttr).Single(); 1278attr = prop.GetAttributes(resDesAttr).Single(); 1281attr = prop.GetAttributes(defValAttr).Single();
Symbols\Metadata\PE\LoadingNamespacesAndTypes.cs (1)
278Assert.Equal(0, collections.GetAttributes(dictionary).Count());
Symbols\Retargeting\RetargetCustomAttributes.cs (4)
107TestAttributeRetargeting(symbol.GetAttributes(newMsCorLib_debuggerTypeProxyAttributeType)); 110Assert.Empty(symbol.GetAttributes(oldMsCorLib_debuggerTypeProxyAttributeType)); 113TestAttributeRetargeting(symbol.GetAttributes(newMsCorLib_debuggerTypeProxyAttributeType)); 116Assert.Empty(symbol.GetAttributes(oldMsCorLib_debuggerTypeProxyAttributeType));