75 references to GetAttributes
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (64)
Attributes\AttributeTests.cs (53)
2832Assert.Equal(1, delegateType.GetAttributes(typeAttrType).Count()); 2837Assert.Equal(1, typeParameters[0].GetAttributes(typeParamAttrType).Count()); 2850Assert.Equal(1, parameters[0].GetAttributes(paramAttrType).Count()); 2852Assert.Equal(1, parameters[1].GetAttributes(paramAttrType).Count()); 2854Assert.Equal(1, parameters[2].GetAttributes(paramAttrType).Count()); 2874Assert.Equal(1, parameters[0].GetAttributes(paramAttrType).Count()); 2876Assert.Equal(1, parameters[1].GetAttributes(paramAttrType).Count()); 2878Assert.Equal(1, parameters[2].GetAttributes(paramAttrType).Count()); 2879Assert.Equal(0, parameters[3].GetAttributes(paramAttrType).Count()); 2880Assert.Equal(0, parameters[4].GetAttributes(paramAttrType).Count()); 2891Assert.Equal(1, parameters[0].GetAttributes(paramAttrType).Count()); 2893Assert.Equal(1, parameters[1].GetAttributes(paramAttrType).Count()); 2894Assert.Equal(0, parameters[2].GetAttributes(paramAttrType).Count()); 2973Assert.Equal(1, parameters[0].GetAttributes(paramAttrType).Count()); 2975Assert.Equal(1, parameters[1].GetAttributes(paramAttrType).Count()); 2995Assert.Equal(1, parameters[0].GetAttributes(paramAttrType).Count()); 2997Assert.Equal(1, parameters[1].GetAttributes(paramAttrType).Count()); 2998Assert.Equal(0, parameters[2].GetAttributes(paramAttrType).Count()); 2999Assert.Equal(0, parameters[3].GetAttributes(paramAttrType).Count()); 3490var attrs = method.GetAttributes(attributeClass); 3497attrs = method.GetAttributes(attributeClass); 3504attrs = method.GetAttributes(attributeClass); 3827var attrs = enumType.GetAttributes(attributeType); 3830attrs = genMethod.GetAttributes(attributeType2); 3864var attrs = type.GetAttributes(attributeType); 3912var attrs = field.GetAttributes(attributeType); 3967var attrs = setter.GetAttributes(attributeTypeForMethod); 3973attrs = setter.Parameters[0].GetAttributes(attributeTypeForParam); 3986attrs = getter.GetAttributes(attributeTypeForMethod); 4477var attrs = cClass.GetAttributes(attributeType); 4483attrs = typeParameters[0].GetAttributes(attributeType); 4532var attrs = bClass.GetAttributes(attributeType); 4572var attrs = bClass.GetAttributes(attributeType); 4666var attrs = attributeType.GetAttributes(attributeType); 4793Assert.Equal(1, gooMethod.GetAttributes(a1Class).Count()); 4794Assert.Equal(1, gooMethod.GetAttributes(a2Class).Count()); 4800Assert.Equal(1, typeParam1.GetAttributes(c1Class).Count()); 4801Assert.Equal(1, typeParam1.GetAttributes(c2Class).Count()); 4804Assert.Equal(1, typeParam2.GetAttributes(d1Class).Count()); 4805Assert.Equal(1, typeParam2.GetAttributes(d2Class).Count()); 4808Assert.Equal(1, param.GetAttributes(e1Class).Count()); 4809Assert.Equal(1, param.GetAttributes(e2Class).Count()); 4845Assert.Equal(1, type.GetAttributes(aClass).Count()); 4846Assert.Equal(1, type.GetAttributes(bClass).Count()); 4882Assert.Equal(1, typeParameter.GetAttributes(aClass).Count()); 4883Assert.Equal(1, typeParameter.GetAttributes(bClass).Count()); 4915Assert.Equal(1, GClass.GetAttributes(attributeType).Count()); 4918Assert.Equal(1, enumE.GetAttributes(attributeType).Count()); 4953var attrs = attributeType.GetAttributes(attributeType); 4959attrs = cClass.GetAttributes(attributeType); 5013var attrs = cClass.GetAttributes(attributeTypeA); 5025attrs = cClass.GetAttributes(attributeTypeB); 5073var attrs = testClass.GetAttributes(attributeType);
Attributes\AttributeTests_WellKnownAttributes.cs (11)
3682attrs = worksheetInterface.GetAttributes(comImportType); 3690attrs = worksheetInterface.GetAttributes(comImportType); 3694attrs = worksheetInterface.GetAttributes(guidType); 3697attrs = worksheetInterface.GetAttributes(coClassType); 3813attrs = worksheetInterface.GetAttributes(comImportType); 3821attrs = worksheetInterface.GetAttributes(comImportType); 3825attrs = worksheetInterface.GetAttributes(guidType); 3828attrs = worksheetInterface.GetAttributes(coClassType); 5061var attrs = attrType.GetAttributes(attrType); 5548Assert.Equal(1, typeA.GetAttributes(windowsRuntimeImportAttrType).Count()); 5612Assert.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)
106TestAttributeRetargeting(symbol.GetAttributes(newMsCorLib_debuggerTypeProxyAttributeType)); 109Assert.Empty(symbol.GetAttributes(oldMsCorLib_debuggerTypeProxyAttributeType)); 112TestAttributeRetargeting(symbol.GetAttributes(newMsCorLib_debuggerTypeProxyAttributeType)); 115Assert.Empty(symbol.GetAttributes(oldMsCorLib_debuggerTypeProxyAttributeType));