56 overrides of GetAttributes
Microsoft.CodeAnalysis.VisualBasic (52)
Lowering\StateMachineRewriter\StateMachineTypeSymbol.vb (1)
62Public NotOverridable Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Lowering\StateMachineRewriter\SynthesizedStateMachineMethod.vb (1)
202Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Metadata\PE\PEAssemblySymbol.vb (1)
125Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Metadata\PE\PEEventSymbol.vb (1)
260Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Metadata\PE\PEFieldSymbol.vb (1)
139Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Metadata\PE\PEMethodSymbol.vb (1)
610Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Metadata\PE\PEModuleSymbol.vb (1)
139Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Metadata\PE\PENamedTypeSymbol.vb (1)
415Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Metadata\PE\PEParameterSymbol.vb (1)
358Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Metadata\PE\PEPropertySymbol.vb (1)
332Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Metadata\PE\PETypeParameterSymbol.vb (1)
137Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\ReducedExtensionMethodSymbol.vb (3)
607Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData) 730Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData) 979Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Retargeting\RetargetingAssemblySymbol.vb (1)
146Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Retargeting\RetargetingEventSymbol.vb (1)
79Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Retargeting\RetargetingFieldSymbol.vb (1)
106Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Retargeting\RetargetingMethodSymbol.vb (1)
376Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Retargeting\RetargetingModuleSymbol.vb (1)
132Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Retargeting\RetargetingNamedTypeSymbol.vb (1)
473Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Retargeting\RetargetingParameterSymbol.vb (1)
216Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Retargeting\RetargetingPropertySymbol.vb (1)
95Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Retargeting\RetargetingTypeParameterSymbol.vb (1)
125Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Source\CrefTypeParameterSymbol.vb (1)
48Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Source\SourceAssemblySymbol.vb (1)
526Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Source\SourceClonedParameterSymbol.vb (1)
66Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Source\SourceEventSymbol.vb (1)
613Public NotOverridable Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Source\SourceFieldSymbol.vb (1)
627Public NotOverridable Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Source\SourceMethodSymbol.vb (1)
1433Public NotOverridable Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Source\SourceModuleSymbol.vb (1)
234Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Source\SourceNamedTypeSymbol.vb (1)
1848Public NotOverridable Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Source\SourceNamedTypeSymbol_ComClass.vb (4)
980Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData) 1311Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData) 1607Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData) 1831Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Source\SourceParameterSymbol.vb (1)
179Public NotOverridable Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Source\SourcePropertySymbol.vb (1)
514Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Source\SourceTypeParameterSymbol.vb (1)
40Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\SubstitutedEventSymbol.vb (1)
121Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\SubstitutedFieldSymbol.vb (1)
127Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\SubstitutedMethodSymbol.vb (1)
160Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\SubstitutedNamedType.vb (1)
230Public NotOverridable Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\SubstitutedParameterSymbol.vb (1)
58Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\SubstitutedPropertySymbol.vb (1)
113Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\SubstitutedTypeParameterSymbol.vb (1)
107Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Tuples\TupleEventSymbol.vb (1)
104Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Tuples\TupleFieldSymbol.vb (1)
96Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Tuples\TupleMethodSymbol.vb (1)
119Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Tuples\TuplePropertySymbol.vb (1)
132Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Tuples\TupleTypeSymbol.vb (1)
966Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\UnboundGenericType.vb (1)
245Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Symbols\Wrapped\WrappedParameterSymbol.vb (1)
174Public Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (4)
MockSymbols.vb (4)
197Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData) 435Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData) 683Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData) 763Public Overloads Overrides Function GetAttributes() As ImmutableArray(Of VisualBasicAttributeData)
557 references to GetAttributes
Microsoft.CodeAnalysis.VisualBasic (51)
Compilation\ClsComplianceChecker.vb (2)
221For Each attribute In symbol.GetAttributes() 761For Each attributeData In symbol.GetAttributes()
Compilation\MethodCompiler.vb (1)
856If sourceTypeSymbol.TypeKind = TypeKind.Class AndAlso sourceTypeSymbol.GetAttributes().IndexOfAttribute(sourceTypeSymbol, AttributeDescription.DesignerGeneratedAttribute) > -1 Then
Emit\NoPia\EmbeddedEvent.vb (1)
66For Each attrData In underlyingContainingType.AdaptedNamedTypeSymbol.GetAttributes()
Emit\ParameterSymbolAdapter.vb (1)
187Return Me.IsOptional OrElse GetAttributes().Any(Function(a) a.IsTargetAttribute(Me, AttributeDescription.OptionalAttribute))
Emit\SymbolAdapter.vb (1)
84Return GetCustomAttributesToEmit(Me.GetAttributes(), synthesized, isReturnType:=False, emittingAssemblyAttributesInNetModule:=emittingAssemblyAttributesInNetModule)
Lowering\LocalRewriter\LocalRewriter_AddRemoveHandler.vb (1)
217For Each attrData In [interface].GetAttributes()
Lowering\StateMachineRewriter\StateMachineTypeSymbol.vb (2)
64Debug.Assert(MyBase.GetAttributes().Length = 0) 70For Each attribute In kickoffType.GetAttributes()
Lowering\StateMachineRewriter\SynthesizedStateMachineMethod.vb (2)
204Debug.Assert(MyBase.GetAttributes().Length = 0) 210For Each attribute In kickoffMethod.GetAttributes()
Symbols\EmbeddedSymbols\EmbeddedSymbolManager.SymbolsCollection.vb (2)
323For Each attribute In symbol.GetAttributes() 385Debug.Assert(parameter.GetAttributes().IsEmpty)
Symbols\EventSymbol.vb (1)
89Return If(field Is Nothing, ImmutableArray(Of VisualBasicAttributeData).Empty, field.GetAttributes())
Symbols\PropertySymbol.vb (1)
293Return If(field Is Nothing, ImmutableArray(Of VisualBasicAttributeData).Empty, field.GetAttributes())
Symbols\ReducedExtensionMethodSymbol.vb (3)
608Return _curriedFromMethod.GetAttributes() 731Return _curriedFromTypeParameter.GetAttributes() 980Return m_CurriedFromParameter.GetAttributes()
Symbols\Retargeting\RetargetingSymbolTranslator.vb (2)
267For Each attrData In type.GetAttributes() 799oldAttributes = underlyingSymbol.GetAttributes()
Symbols\Retargeting\RetargetingTypeParameterSymbol.vb (1)
126Return _underlyingTypeParameter.GetAttributes()
Symbols\Source\SourceClonedParameterSymbol.vb (1)
67Return _originalParam.GetAttributes()
Symbols\Source\SourceMemberContainerTypeSymbol.vb (2)
319Dim unused4 = GetAttributes() 1156sym.GetAttributes()
Symbols\Source\SourceMemberMethodSymbol.vb (1)
1006Dim attrs = prop.GetAttributes()
Symbols\Source\SourceMethodSymbol.vb (1)
550unusedAttributes = parameter.GetAttributes()
Symbols\Source\SourceModuleSymbol.vb (3)
591Me.ContainingAssembly.GetAttributes() 667unused = Me.ContainingAssembly.GetAttributes() 768For Each attrData In assembly.GetAttributes()
Symbols\Source\SourceNamedTypeSymbol_ComClass.vb (5)
306Dim attrData As ImmutableArray(Of VisualBasicAttributeData) = target.GetAttributes() 480Dim attrData As ImmutableArray(Of VisualBasicAttributeData) = target.GetAttributes() 1313Dim toClone As ImmutableArray(Of VisualBasicAttributeData) = attributeSource.GetAttributes() 1612Return _clonedFrom.GetAttributes() 1832Return _clonedFrom.GetAttributes()
Symbols\SubstitutedEventSymbol.vb (1)
122Return Me._originalDefinition.GetAttributes()
Symbols\SubstitutedFieldSymbol.vb (1)
129Return _originalDefinition.GetAttributes()
Symbols\SubstitutedMethodSymbol.vb (1)
162Return OriginalDefinition.GetAttributes()
Symbols\SubstitutedNamedType.vb (1)
231Return OriginalDefinition.GetAttributes()
Symbols\SubstitutedParameterSymbol.vb (1)
59Return _originalDefinition.GetAttributes()
Symbols\SubstitutedPropertySymbol.vb (1)
115Return _originalDefinition.GetAttributes()
Symbols\SubstitutedTypeParameterSymbol.vb (1)
108Return _originalDefinition.GetAttributes()
Symbols\Symbol.vb (2)
701For Each attrData In GetAttributes() 1287Return StaticCast(Of AttributeData).From(Me.GetAttributes())
Symbols\Symbol_Attributes.vb (1)
622Me.GetAttributes()
Symbols\Tuples\TupleEventSymbol.vb (1)
105Return Me._underlyingEvent.GetAttributes()
Symbols\Tuples\TupleFieldSymbol.vb (1)
97Return Me._underlyingField.GetAttributes()
Symbols\Tuples\TupleMethodSymbol.vb (1)
120Return Me._underlyingMethod.GetAttributes()
Symbols\Tuples\TuplePropertySymbol.vb (1)
133Return Me._underlyingProperty.GetAttributes()
Symbols\Tuples\TupleTypeSymbol.vb (1)
967Return Me._underlyingType.GetAttributes()
Symbols\UnboundGenericType.vb (1)
246Return OriginalDefinition.GetAttributes()
Symbols\Wrapped\WrappedParameterSymbol.vb (1)
175Return Me._underlyingParameter.GetAttributes()
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (260)
Attributes\AssemblyAttributes.vb (12)
1222Dim allSrcAttrs = assembly.GetAttributes() 1296Dim attrs = consoleappCompilation.Assembly.GetAttributes() 1330Assert.Equal(0, consoleappCompilation.Assembly.GetAttributes().Length) 1413Dim attrs = consoleappCompilation.Assembly.GetAttributes() 1441Assert.Equal(0, consoleappCompilation.Assembly.GetAttributes().Length) 1487Dim attrs = consoleappCompilation.Assembly.GetAttributes() 1585Dim attrs = consoleappCompilation.Assembly.GetAttributes() 1620Dim attrs = comp.Assembly.GetAttributes() 1629attrs = comp.Assembly.GetAttributes() 1637attrs = comp.Assembly.GetAttributes() 1917Dim attrs = moduleSymbol.ContainingAssembly.GetAttributes().Select(Function(a) a.ToString()).ToArray() 2079For Each attrData In assembly.GetAttributes()
Attributes\AttributeTests.vb (106)
62Assert.Equal(0, yParam.GetAttributes().Length) 160Assert.Equal(0, yParam.GetAttributes().Length) 258Dim attrs = compilation.Assembly.GetAttributes() 332Dim attrs = compilation.SourceModule.GlobalNamespace.GetMember("A").GetAttributes() 355Dim attrs = compilation.SourceModule.GlobalNamespace.GetMember("Goo").GetAttributes() 405Assert.Equal(1, ap.GetAttributes().Length) 408Assert.Equal(0, get_AP.GetAttributes().Length) 410Assert.Equal(1, get_AP.Parameters(0).GetAttributes().Length) 413Assert.Equal(0, set_AP.GetAttributes().Length) 415Assert.Equal(1, set_AP.Parameters(0).GetAttributes().Length) 416Assert.Equal(0, set_AP.Parameters(1).GetAttributes().Length) 420Assert.Equal(1, ap.GetAttributes().Length) 424Assert.Equal(0, get_AP.GetAttributes().Length) 426AssertEx.Equal({"CompilerGeneratedAttribute"}, GetAttributeNames(get_AP.GetAttributes())) 432Assert.Equal(0, get_AP.GetAttributes().Length) 434AssertEx.Equal({"CompilerGeneratedAttribute"}, GetAttributeNames(set_AP.GetAttributes())) 437Assert.Equal(0, set_AP.Parameters(0).GetAttributes().Length) 441Assert.Equal(1, p.GetAttributes().Length) 444Assert.Equal(1, get_P.GetAttributes().Length) 446Assert.Equal(1, get_P.Parameters(0).GetAttributes().Length) 449Assert.Equal(1, set_P.GetAttributes().Length) 451Assert.Equal(1, set_P.Parameters(0).GetAttributes().Length) 452Assert.Equal(1, set_P.Parameters(1).GetAttributes().Length) 525Assert.Equal(0, auto.SetMethod.Parameters(0).GetAttributes().Length) 534Assert.Equal(0, auto.SetMethod.Parameters(0).GetAttributes().Length) 540Assert.Equal(0, auto.SetMethod.Parameters(0).GetAttributes().Length) 550Assert.Equal(0, woa.SetMethod.Parameters(0).GetAttributes().Length) 555Assert.Equal(0, a.SetMethod.Parameters(0).GetAttributes().Length) 561Assert.Equal(1, ab.SetMethod.Parameters(0).GetAttributes().Length) 562Assert.Equal("B", ab.SetMethod.Parameters(0).GetAttributes()(0).AttributeClass.Name) 604Assert.Equal(0, auto.SetMethod.Parameters(0).GetAttributes().Length) 649Dim attrs = type.GetAttributes() 655attrs = prop.GetMethod.GetAttributes() 659attrs = prop.GetAttributes() 661attrs = prop.SetMethod.GetAttributes() 701Assert.Equal(1, getter.Parameters(0).GetAttributes().Length) 706Assert.Equal(1, setter.Parameters(0).GetAttributes().Length) 707Assert.Equal(1, setter.Parameters(1).GetAttributes().Length) 767Dim attrs = m.GetAttributes() 773attrs = assembly.GetAttributes() 789attrs = field.GetAttributes() 796attrs = nenum.GetAttributes() 800attrs = nenum.GetMember("three").GetAttributes() 851Dim attrs = dele.GetAttributes() 860Assert.Equal(0, mem.GetAttributes().Length) 863attrs = mem.Parameters(0).GetAttributes() 902Dim attrs = type.GetMember(Of MethodSymbol)("F").GetAttributes() 939Dim attrs = type.GetAttributes() 950Dim attrs = type.GetAttributes() 1168Dim attrs = bClass.GetAttributes() 1218Dim attrs = cClass.GetAttributes() 1260Dim attrs = bClass.GetAttributes() 1337Dim attrs = aClass.GetAttributes() 1342attrs = bClass.GetAttributes() 1346attrs = bClass.GetAttributes() 1350attrs = bClass.GetAttributes() 1354attrs = bClass.GetAttributes() 1358attrs = bClass.GetAttributes() 1362attrs = bClass.GetAttributes() 1366attrs = bClass.GetAttributes() 1370attrs = bClass.GetAttributes() 1428Dim attrs = aClass.GetAttributes() 1457Dim attrs = aClass.GetAttributes() 1753Assert.Equal(0, myButton.GetAttributes().Length) 1789Assert.Equal(0, myButton.GetAttributes().Length) 1821Assert.Equal(2, onClick.GetAttributes().Length) ' should be 1 1900Dim ca = goo.GetAttributes().First().CommonConstructorArguments.First() 1949Dim gt = a.GetAttributes().First().CommonConstructorArguments.First() 2001Dim gt = a.GetAttributes().First().CommonConstructorArguments.First() 2036Dim gt = a.GetAttributes().First().CommonConstructorArguments.First() 2080Dim gt = a.GetAttributes().First().CommonConstructorArguments.First() 2174Dim attrs = classC1.GetAttributes() 2179attrs = classC2.GetAttributes() 2184attrs = classC3.GetAttributes() 2190attrs = classC4.GetAttributes() 2197attrs = classC5.GetAttributes() 2206attrs = classC6.GetAttributes() 2983Dim attrs = goo.GetAttributes() 3150Assert.Equal(0, invoke.GetAttributes().Length) 3151Assert.Equal(0, beginInvoke.GetAttributes().Length) 3152Assert.Equal(0, endInvoke.GetAttributes().Length) 3153Assert.Equal(0, ctor.GetAttributes().Length) 3166Assert.Equal(0, ctor.Parameters(0).GetAttributes().Length) 3167Assert.Equal(0, ctor.Parameters(0).GetAttributes().Length) 3172attrs = invoke.Parameters(0).GetAttributes() 3176attrs = invoke.Parameters(1).GetAttributes() 3185attrs = p.GetAttributes() 3194attrs = p.GetAttributes() 3201Assert.Equal(0, beginInvoke.Parameters(2).GetAttributes().Length) 3202Assert.Equal(0, beginInvoke.Parameters(3).GetAttributes().Length) 3209attrs = p.GetAttributes() 3217attrs = p.GetAttributes() 4002Dim attributesOnMain = comp.GlobalNamespace.GetModuleMembers("Module1").Single().GetMembers("Main").Single().GetAttributes() 4043Assert.Equal(0, type.GetAttributes()(0).ConstructorArguments.Count) 4076Dim attr = c.GetAttributes().Single() 4178Dim attr = c.GetAttributes().Single() 4326methods(0).GetAttributes().Single().VerifyValue(0, TypedConstantKind.Array, New Integer() {1, 2, 3}) 4327methods(1).GetAttributes().Single().VerifyValue(0, TypedConstantKind.Array, New Object() {1, 2, 3}) 4328methods(2).GetAttributes().Single().VerifyValue(0, TypedConstantKind.Array, New String() {"A", "B", "C"}) 4329methods(3).GetAttributes().Single().VerifyValue(0, TypedConstantKind.Array, New Object() {"A", "B", "C"}) 4330methods(4).GetAttributes().Single().VerifyValue(0, TypedConstantKind.Array, New Object() {}) ' Value was invalid. 4331methods(5).GetAttributes().Single().VerifyValue(0, TypedConstantKind.Array, New Object() {DirectCast({1, 2, 3}, Object), DirectCast({"A", "B", "C"}, Object)}) 4388Dim attrs = methods.Select(Function(m) m.GetAttributes().Single()).ToArray() 4438Dim typeInAttribute = DirectCast(type.GetAttributes()(0).ConstructorArguments(0).Value, NamedTypeSymbol) 4448typeInAttribute = DirectCast(type.GetAttributes()(0).ConstructorArguments(0).Value, NamedTypeSymbol) 4482Assert.Equal("Z", program.GetAttributes()(0).AttributeClass.ToTestDisplayString())
Attributes\AttributeTests_Conditional.vb (23)
161attributesArrayBuilder.Add(Tuple.Create(classZ.GetAttributes(), False)) 164attributesArrayBuilder.Add(Tuple.Create(methodM.GetAttributes(), False)) 167attributesArrayBuilder.Add(Tuple.Create(param1.GetAttributes(), False)) 170attributesArrayBuilder.Add(Tuple.Create(fieldF.GetAttributes(), True)) 173attributesArrayBuilder.Add(Tuple.Create(propP1.GetAttributes(), True)) 175attributesArrayBuilder.Add(Tuple.Create(propGetMethod.GetAttributes(), True)) 178attributesArrayBuilder.Add(Tuple.Create(propSetMethod.GetAttributes(), False)) 180Assert.Equal(0, propSetMethod.Parameters(0).GetAttributes().Length) 183attributesArrayBuilder.Add(Tuple.Create(propP2.GetAttributes(), False)) 185Assert.Equal(0, propGetMethod.GetAttributes().Length) 189attributesArrayBuilder.Add(Tuple.Create(propP3.GetAttributes(), False)) 191Assert.Equal(0, propGetMethod.GetAttributes().Length) 194Assert.Equal(0, propSetMethod.GetAttributes().Length) 196Assert.Equal(0, propSetMethod.Parameters(0).GetAttributes().Length) 199attributesArrayBuilder.Add(Tuple.Create(eventE.GetAttributes(), False)) 201Assert.Equal(0, eventE.AssociatedField.GetAttributes().Length) 202Assert.Equal(0, eventE.AddMethod.GetAttributes().Length) 203Assert.Equal(0, eventE.RemoveMethod.GetAttributes().Length) 205AssertEx.Equal({"CompilerGeneratedAttribute"}, GetAttributeNames(eventE.AddMethod.GetAttributes())) 206AssertEx.Equal({"CompilerGeneratedAttribute"}, GetAttributeNames(eventE.RemoveMethod.GetAttributes())) 212attributesArrayBuilder.Add(Tuple.Create(enumE.GetAttributes(), True)) 215attributesArrayBuilder.Add(Tuple.Create(fieldA.GetAttributes(), True)) 218attributesArrayBuilder.Add(Tuple.Create(structS.GetAttributes(), True))
Attributes\AttributeTests_Synthesized.vb (58)
71Dim actualAttrs = GetAttributeNames(pid.GetAttributes()) 109Dim attrs = p.GetAttributes() 115attrs = e.GetAttributes() 121attrs = we.GetAttributes() 166Dim attrs = p.GetMethod.GetAttributes() 169attrs = p.SetMethod.GetAttributes() 172attrs = q.GetMethod.GetAttributes() 175attrs = q.SetMethod.GetAttributes() 178attrs = we.GetMethod.GetAttributes() 181attrs = we.SetMethod.GetAttributes() 184attrs = e.AddMethod.GetAttributes() 187attrs = e.RemoveMethod.GetAttributes() 227Dim aAttrs = GetAttributeNames(a.InstanceConstructors.Single().GetAttributes()) 228Dim bAttrs = GetAttributeNames(b.InstanceConstructors.Single().GetAttributes()) 229Dim cAttrs = GetAttributeNames(c.InstanceConstructors.Single().GetAttributes()) 283AssertEx.SetEqual(expectedNames, GetAttributeNames(baseWrapper.GetAttributes())) 339AssertEx.SetEqual(expectedNames, GetAttributeNames(baseWrapper.GetAttributes())) 341Assert.Empty(baseWrapper.Parameters.Single().GetAttributes()) 342Assert.Empty(baseWrapper.TypeParameters.Single().GetAttributes()) 371Dim actual = GetAttributeNames(displayClass.GetAttributes()) 376actual = GetAttributeNames(member.GetAttributes()) 422Dim actual = GetAttributeNames(anonDelegate.GetAttributes()) 427actual = GetAttributeNames(member.GetAttributes()) 531AssertEx.SetEqual({"DebuggerDisplayAttribute", "CompilerGeneratedAttribute"}, GetAttributeNames(anon.GetAttributes())) 534Dim actual = GetAttributeNames(member.GetAttributes()) 613Dim dd = anon.GetAttributes().Where(Function(a) a.AttributeClass.Name = "DebuggerDisplayAttribute").Single() 765Dim attributes = m.ContainingAssembly.GetAttributes() 804Dim attributes = m.ContainingAssembly.GetAttributes() 809Dim attributes = m.ContainingAssembly.GetAttributes() 846Dim attributes = m.ContainingAssembly.GetAttributes() 851Dim attributes = m.ContainingAssembly.GetAttributes() 890Dim attributes = m.ContainingAssembly.GetAttributes() 897Dim attributes = m.ContainingAssembly.GetAttributes() 959Assert.Empty(m.ContainingAssembly.GetAttributes()) 962Dim moduleAttributes = m.GetAttributes() 967Dim moduleAttributes = m.GetAttributes() 971Dim assemblyAttributes = m.ContainingAssembly.GetAttributes() 1029Dim attributes = m.ContainingAssembly.GetAttributes() 1074Dim attributes = m.ContainingAssembly.GetAttributes() 1112Dim attributes = m.ContainingAssembly.GetAttributes() 1150Dim attributes = m.ContainingAssembly.GetAttributes() 1189Dim assemblyAttributes = m.ContainingAssembly.GetAttributes() 1203Dim moduleAttributes = m.GetAttributes() 1269Dim attributes = m.ContainingAssembly.GetAttributes() 1321Dim attributes = m.ContainingAssembly.GetAttributes() 1368Dim attributes = m.ContainingAssembly.GetAttributes() 1417Dim attributes = m.ContainingAssembly.GetAttributes() 1462Dim asyncMethodAttributes = asyncMethod.GetAttributes() 1489Dim asyncMethodAttributes = asyncMethod.GetAttributes() 1519Dim asyncMethodAttributes = asyncMethod.GetAttributes() 1549Dim asyncMethodAttributes = asyncMethod.GetAttributes() 1577Dim asyncMethodAttributes = asyncMethod.GetAttributes() 1605Dim asyncMethodAttributes = asyncMethod.GetAttributes() 1630Dim asyncMethodAttributes = asyncMethod.GetAttributes() 1660Dim iteratorMethodAttributes = iteratorMethod.GetAttributes() 1694Dim iteratorMethodAttributes = iteratorMethod.GetAttributes() 1724Dim iteratorMethodAttributes = iteratorMethod.GetAttributes() 1755Dim iteratorMethodAttributes = iteratorMethod.GetAttributes()
Attributes\AttributeTests_Tuples.vb (1)
419If(forReturnType, DirectCast(symbol, MethodSymbol).GetReturnTypeAttributes(), symbol.GetAttributes()).
Attributes\AttributeTests_WellKnownAttributes.vb (30)
90Assert.Equal(5, igoo.GetAttributes().Length) 92Assert.Equal(6, igoo.GetAttributes().Length) 125Assert.Equal(1, mem.GetAttributes().Length) 126attrSym = mem.GetAttributes().First() 131attrSym = mem.GetAttributes().First() 136Assert.Equal(1, mem.GetAttributes().Length) 139attrSym = mem.GetAttributes().First() 208Assert.Equal(2, type1.GetAttributes().Length) 229Assert.Equal(2, type2.GetAttributes().Length) 250Assert.Equal(2, type3.GetAttributes().Length) 260Assert.Equal(0, field.GetAttributes().Length) 263Assert.Equal(1, field.GetAttributes().Length) 264attrSym = field.GetAttributes.First 269attrSym = field.GetAttributes().First() 371Assert.Equal(3, parm.GetAttributes().Length) 381Assert.Equal(3, parm.GetAttributes().Length) 391attrSym = method.GetAttributes().First() 395attrSym = parm.GetAttributes().First() 400attrSym = parm.GetAttributes().First() 411Assert.Equal(2, type2.GetAttributes().Length) 424Assert.Equal(3, field.GetAttributes().Length) 961Dim attrSym = method.GetAttributes().First() 972attrSym = method.GetAttributes().First() 1198Dim attrSym = method.GetAttributes().First() 3368Dim gt = compilation2.GetTypeByMetadataName("Module1").GetAttributes().First().CommonConstructorArguments.First() 5457Assert.Equal(0, typeA.GetAttributes().Length) 5478Dim attributes = method.GetAttributes().Where(Function(attribute) attribute.AttributeClass.MetadataName = "STAThreadAttribute") 6759GetMember(Of MethodSymbol)("MoveNext").GetAttributes().Single().AttributeClass.ToTestDisplayString()) 6769GetMember(Of MethodSymbol)("MoveNext").GetAttributes().Single().AttributeClass.ToTestDisplayString()) 7056Dim attribute = [module].ContainingAssembly.GetTypeByMetadataName("Program").GetMethod("Test").Parameters.Single().GetAttributes().Single()
CodeGen\CodeGenAsyncTests.vb (1)
8391ArrayToSortedString((From a In symbol.GetAttributes() Select FormatAttribute(a)).ToArray()))
CodeGen\CodeGenTests.vb (4)
11630Assert.Equal(1, typeA.GetAttributes().Length) 11638Assert.Equal(1, typeB.GetAttributes().Length) 11650Assert.Equal(0, typeA.GetAttributes().Length) 11654Assert.Equal(0, typeB.GetAttributes().Length)
CodeGen\CodeGenTuples.vb (17)
5772Assert.True(mFirst.GetAttributes().IsEmpty) 5792Assert.True(mItem1.GetAttributes().IsEmpty) 15089Assert.True(m1Tuple.GetAttributes().IsEmpty) 15128Assert.True(m1Item1.GetAttributes().IsEmpty) 15144Assert.True(m2Item1.GetAttributes().IsEmpty) 15163Assert.True(m2a2.GetAttributes().IsEmpty) 15378Assert.True(m3Item8.GetAttributes().IsEmpty) 15541Assert.True(m4Item8.GetAttributes().IsEmpty) 15561Assert.True(m4h4.GetAttributes().IsEmpty) 15795Assert.True(m5Item8.GetAttributes().IsEmpty) 16151Assert.True(m8Item8.GetAttributes().IsEmpty) 16171Assert.True(m8Item1.GetAttributes().IsEmpty) 16313Assert.True(m1Tuple.GetAttributes().IsEmpty) 16347Assert.True(m1Item1.GetAttributes().IsEmpty) 16367Assert.True(m2Item1.GetAttributes().IsEmpty) 16390Assert.True(m2a2.GetAttributes().IsEmpty) 16414Assert.True(m1ToString.GetAttributes().IsEmpty)
CodeGen\CodeGenVBCore.vb (1)
3230For Each attribute In symbol.GetAttributes()
Emit\CompilationEmitTests.vb (6)
895Assert.NotNull(itest1.GetAttributes().Where(Function(a) a.IsTargetAttribute("System.Runtime.InteropServices", "TypeIdentifierAttribute")).Single()) 902Assert.NotNull(s.GetAttributes().Where(Function(a) a.IsTargetAttribute("System.Runtime.InteropServices", "TypeIdentifierAttribute")).Single()) 984Assert.NotNull(s.GetAttributes().Where(Function(a) a.IsTargetAttribute("System.Runtime.InteropServices", "TypeIdentifierAttribute")).Single()) 1499realAssembly.GetAttributes().Select(Function(a) a.AttributeClass.ToTestDisplayString())) 1531metadataAssembly.GetAttributes().Select(Function(a) a.AttributeClass.ToTestDisplayString())) 1562refAssembly.GetAttributes().Select(Function(a) a.AttributeClass.ToTestDisplayString()))
Emit\NoPiaEmbedTypes.vb (1)
2697Assert.Equal(0, param.GetAttributes().Length)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (93)
Binding\BindingErrorTests.vb (7)
1171Dim attribute = scen18.GetAttributes().Single() 18619Assert.Equal(2, compilation.Assembly.GetAttributes.Count) 18620Assert.Equal("ESAttribute(""test2"")", compilation.Assembly.GetAttributes.Item(0).ToString) 18621Assert.Equal("ESAttribute(""Test"")", compilation.Assembly.GetAttributes.Item(1).ToString) 18661Assert.Equal(2, compilation.Assembly.GetAttributes.Count) 18662Assert.Equal("ESAttribute(""Test"")", compilation.Assembly.GetAttributes.Item(0).ToString) 18663Assert.Equal("ESAttribute(""Test2"")", compilation.Assembly.GetAttributes.Item(1).ToString)
Semantics\MultiDimensionalTest.vb (4)
2710Dim a1 = DirectCast(p.GetMember(Of MethodSymbol)("Test1").GetAttributes().Single().ConstructorArguments.Single().Value, ArrayTypeSymbol) 2715Dim a2 = DirectCast(p.GetMember(Of MethodSymbol)("Test2").GetAttributes().Single().ConstructorArguments.Single().Value, ArrayTypeSymbol) 2720Assert.True(DirectCast(p.GetMember(Of MethodSymbol)("Test3").GetAttributes().Single().ConstructorArguments.Single().Value, TypeSymbol).IsErrorType()) 2721Assert.True(DirectCast(p.GetMember(Of MethodSymbol)("Test4").GetAttributes().Single().ConstructorArguments.Single().Value, TypeSymbol).IsErrorType())
Semantics\OptionalArgumentTests.vb (60)
2211Assert.Equal(0, parameters(0).GetAttributes().Length) 2217Assert.Equal(0, parameters(1).GetAttributes().Length) 2223Assert.Equal(0, parameters(2).GetAttributes().Length) 2231Assert.Equal(1, parameters(4).GetAttributes().Length) 2237Assert.Equal(1, parameters(5).GetAttributes().Length) 2244Assert.Equal(1, parameters(3).GetAttributes().Length) 2250Assert.Equal(2, parameters(6).GetAttributes().Length) 2256Assert.Equal(2, parameters(7).GetAttributes().Length) 2262Assert.Equal(0, parameters(3).GetAttributes().Length) 2268Assert.Equal(1, parameters(6).GetAttributes().Length) ' DefaultParameterValue 2274Assert.Equal(1, parameters(7).GetAttributes().Length) ' DefaultParameterValue 2322Assert.Equal(0, parameters(0).GetAttributes().Length) 2328Assert.Equal(0, parameters(1).GetAttributes().Length) 2336Assert.Equal(1, parameters(3).GetAttributes().Length) 2343Assert.Equal(1, parameters(2).GetAttributes().Length) 2349Assert.Equal(2, parameters(4).GetAttributes().Length) 2355Assert.Equal(0, parameters(2).GetAttributes().Length) 2361Assert.Equal(1, parameters(4).GetAttributes().Length) ' DefaultParameterValue 2411Assert.Equal(0, parameters(0).GetAttributes().Length) 2417Assert.Equal(0, parameters(1).GetAttributes().Length) 2423Assert.Equal(0, parameters(2).GetAttributes().Length) 2431Assert.Equal(1, parameters(4).GetAttributes().Length) 2437Assert.Equal(1, parameters(5).GetAttributes().Length) 2444Assert.Equal(1, parameters(3).GetAttributes().Length) 2450Assert.Equal(2, parameters(6).GetAttributes().Length) 2456Assert.Equal(2, parameters(7).GetAttributes().Length) 2462Assert.Equal(0, parameters(3).GetAttributes().Length) 2468Assert.Equal(1, parameters(6).GetAttributes().Length) 2474Assert.Equal(1, parameters(7).GetAttributes().Length) 2536Assert.Equal(0, parameters(0).GetAttributes().Length) 2542Assert.Equal(0, parameters(1).GetAttributes().Length) 2548Assert.Equal(0, parameters(2).GetAttributes().Length) 2556Assert.Equal(1, parameters(4).GetAttributes().Length) ' DefaultParameterValue 2562Assert.Equal(1, parameters(5).GetAttributes().Length) ' DefaultParameterValue 2572Assert.Equal(1, parameters(8).GetAttributes().Length) ' DecimalConstantAttribute 2578Assert.Equal(1, parameters(9).GetAttributes().Length) ' DecimalConstantAttribute 2585Assert.Equal(1, parameters(3).GetAttributes().Length) 2591Assert.Equal(2, parameters(6).GetAttributes().Length) 2597Assert.Equal(2, parameters(7).GetAttributes().Length) 2603Assert.Equal(2, parameters(10).GetAttributes().Length) 2609Assert.Equal(2, parameters(11).GetAttributes().Length) 2615Assert.Equal(0, parameters(3).GetAttributes().Length) 2621Assert.Equal(1, parameters(6).GetAttributes().Length) ' DefaultParameterValue 2627Assert.Equal(1, parameters(7).GetAttributes().Length) ' DefaultParameterValue 2633Assert.Equal(0, parameters(10).GetAttributes().Length) 2639Assert.Equal(0, parameters(11).GetAttributes().Length) 2698Assert.Equal(0, parameters(0).GetAttributes().Length) 2704Assert.Equal(0, parameters(1).GetAttributes().Length) 2710Assert.Equal(0, parameters(2).GetAttributes().Length) 2718Assert.Equal(1, parameters(4).GetAttributes().Length) ' DefaultParameterValue 2726Assert.Equal(1, parameters(6).GetAttributes().Length) ' DateTimeConstant 2732Assert.Equal(1, parameters(7).GetAttributes().Length) ' DateTimeConstant 2739Assert.Equal(1, parameters(3).GetAttributes().Length) 2745Assert.Equal(2, parameters(5).GetAttributes().Length) 2751Assert.Equal(2, parameters(8).GetAttributes().Length) 2757Assert.Equal(2, parameters(9).GetAttributes().Length) 2763Assert.Equal(0, parameters(3).GetAttributes().Length) 2769Assert.Equal(1, parameters(5).GetAttributes().Length) ' DefaultParameterValue 2775Assert.Equal(0, parameters(8).GetAttributes().Length) 2781Assert.Equal(0, parameters(9).GetAttributes().Length)
Semantics\OverloadResolution.vb (1)
4832Assert.Equal("Sub ProvideMenuResourceAttribute..ctor(x As System.Int16, y As System.Int32)", TNuggetPackage.GetAttributes()(0).AttributeConstructor.ToTestDisplayString())
Semantics\PartialMethodsTest.vb (21)
440Dim attributes = methodDecl.GetAttributes() 497Dim attributes = parameter.GetAttributes() 554Dim attributes = parameter.GetAttributes() 612Dim attributes = parameter.GetAttributes() 619attributes = parameter.GetAttributes() 679Assert.Equal(0, SimpleDefSimpleImpl.Parameters(0).GetAttributes().Length) 680Assert.Equal(0, SimpleDefSimpleImpl.PartialImplementationPart.Parameters(0).GetAttributes().Length) 682Assert.Equal(1, ComplexDefSimpleImpl.Parameters(0).GetAttributes().Length) 683Assert.Equal(1, ComplexDefSimpleImpl.PartialImplementationPart.Parameters(0).GetAttributes().Length) 685Assert.Equal(1, SimpleDefComplexImpl.Parameters(0).GetAttributes().Length) 686Assert.Equal(1, SimpleDefComplexImpl.PartialImplementationPart.Parameters(0).GetAttributes().Length) 688Assert.Equal(2, ComplexDefComplexImpl.Parameters(0).GetAttributes().Length) 689Assert.Equal(2, ComplexDefComplexImpl.PartialImplementationPart.Parameters(0).GetAttributes().Length) 701Assert.Equal(0, SimpleDefSimpleImpl.PartialImplementationPart.Parameters(0).GetAttributes().Length) 702Assert.Equal(0, SimpleDefSimpleImpl.Parameters(0).GetAttributes().Length) 704Assert.Equal(1, ComplexDefSimpleImpl.PartialImplementationPart.Parameters(0).GetAttributes().Length) 705Assert.Equal(1, ComplexDefSimpleImpl.Parameters(0).GetAttributes().Length) 707Assert.Equal(1, SimpleDefComplexImpl.PartialImplementationPart.Parameters(0).GetAttributes().Length) 708Assert.Equal(1, SimpleDefComplexImpl.Parameters(0).GetAttributes().Length) 710Assert.Equal(2, ComplexDefComplexImpl.PartialImplementationPart.Parameters(0).GetAttributes().Length) 711Assert.Equal(2, ComplexDefComplexImpl.Parameters(0).GetAttributes().Length)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (147)
SymbolsTests\AnonymousDelegates\AnonymousDelegates_CreationAndEmit.vb (2)
39Dim actual = From attribute In anonDelegate.GetAttributes() 54Assert.True(anonDelegate.GetAttributes().Single().IsTargetAttribute(
SymbolsTests\ExtensionMethods\ExtensionMethodTests.vb (1)
1950Dim securityAttributes = assembly.GetAttributes()
SymbolsTests\ImplicitClassTests.vb (2)
36Assert.Equal(0, implicitClass.GetAttributes().Length) 67Assert.Equal(0, scriptClass.GetAttributes().Length)
SymbolsTests\Metadata\MetadataTypeTests.vb (2)
77Assert.Equal(0, a.GetAttributes().Length) ' Should not have StandardModule attribute 82Assert.Equal(0, a.GetAttributes().Length) ' Should not have StandardModule attribute
SymbolsTests\Metadata\PE\LoadingAttributes.vb (61)
246Assert.Equal("C1", c1.GetAttributes.First().CommonConstructorArguments.Single().Value) 249Assert.Equal("InnerC1", innerC1.GetAttributes.First().CommonConstructorArguments.Single().Value) 256Assert.Equal("InnerC2", innerC2.GetAttributes.First().CommonConstructorArguments.Single().Value) 259Assert.Equal("field1", field1.GetAttributes.First().CommonConstructorArguments.Single().Value) 262Assert.Equal("Property1", property1.GetAttributes.First().CommonConstructorArguments.Single().Value) 265Assert.Equal("Sub1", sub1.GetAttributes.First().CommonConstructorArguments.Single().Value) 268Assert.Equal("p1", sub1P1.GetAttributes.First().CommonConstructorArguments.Single().Value) 271Assert.Equal("Function1", function1.GetAttributes.First().CommonConstructorArguments.Single().Value) 274Assert.Equal("p1", function1P1.GetAttributes.First().CommonConstructorArguments.Single().Value) 450Assert.Equal("C1", c1.GetAttributes.First().CommonConstructorArguments.Single().Value) 496Assert.Equal("System.Collections.Generic.List(Of )", DirectCast(l.GetAttributes.First().CommonConstructorArguments.Single().Value, Symbol).ToDisplayString(SymbolDisplayFormat.TestFormat)) 499Assert.Equal("System.Collections.Generic.List(Of C1)", DirectCast(l.GetAttributes.First().CommonConstructorArguments.Single().Value, Symbol).ToDisplayString(SymbolDisplayFormat.TestFormat)) 502Assert.Equal("System.Collections.Generic.List(Of System.String)", DirectCast(l.GetAttributes.First().CommonConstructorArguments.Single().Value, Symbol).ToDisplayString(SymbolDisplayFormat.TestFormat)) 505Assert.Equal("System.Collections.Generic.List(Of System.Collections.Generic.KeyValuePair(Of C1, System.String))", DirectCast(l.GetAttributes.First().CommonConstructorArguments.Single().Value, Symbol).ToDisplayString(SymbolDisplayFormat.TestFormat)) 508Assert.Equal("System.Collections.Generic.List(Of System.Collections.Generic.KeyValuePair(Of System.String, C1.InnerC1(Of System.Int32).InnerC2(Of System.String, System.String)))", DirectCast(l.GetAttributes.First().CommonConstructorArguments.Single().Value, Symbol).ToDisplayString(SymbolDisplayFormat.TestFormat)) 539Dim arg = field.GetAttributes.Single() 543arg = field.GetAttributes.Single() 547arg = field.GetAttributes.Single() 551arg = field.GetAttributes.Single() 555arg = field.GetAttributes.Single 559Dim t = field.GetAttributes.First().CommonConstructorArguments.Single().Type 561arg = field.GetAttributes.Single 565arg = field.GetAttributes.Single 571arg = field.GetAttributes.Single 678Dim attrs = asm.GetAttributes() 778Assert.Equal(4, igoo.GetAttributes().Length) 802Assert.Equal(1, mem.GetAttributes().Length) 804Assert.Equal(1, mem.GetAttributes().Length) 806Assert.Equal(1, mem.GetAttributes().Length) 808attrSym = mem.GetAttributes().First() 834Assert.Equal(2, dfoo.GetAttributes().Length) 875Dim modattr = assemblies(0).Modules(0).GetAttributes().First() 881Assert.Equal(2, myEnum.GetAttributes().Length) 885Assert.Equal(0, field.GetAttributes().Length) 888Assert.Equal(1, field.GetAttributes().Length) 889Dim attrSym = field.GetAttributes().First() 944Assert.Equal(5, ibar.GetAttributes().Length) 945Dim atts = ibar.GetAttributes() 959Assert.Equal(1, mem.GetAttributes().Length) 960Assert.Equal(10, mem.GetAttributes().First().CommonConstructorArguments(0).Value) 967Assert.Equal(1, mem2.GetAttributes().Length) 971Assert.Equal(1, mem2.GetAttributes().Length) 990Assert.Equal(1, mem2.GetAttributes().Length) 991attrSym = mem2.GetAttributes().First() 1017Assert.Equal(4, assemblies(0).GetAttributes().Length) 1028attrSym = assemblies(0).Modules(0).GetAttributes().First() 1067Dim attrSym = tp.GetAttributes().First() 1086Assert.Equal(1, mtd.GetAttributes().Length) 1087attrSym = mtd.GetAttributes().First() 1158Assert.Equal(foo.GetAttributes().Length, attrs.Count) 1194Assert.Equal(2, tp.GetAttributes().Length) 1198Assert.Equal(2, fld.GetAttributes().Length) 1199Assert.Equal(0, fld.GetAttributes().First().CommonNamedArguments.Length) 1203Assert.Equal(1, prop.GetAttributes().Length) 1204Assert.Equal(-1, prop.GetAttributes().First().CommonConstructorArguments(0).Value) 1206Assert.Equal(3, prop.GetMethod.GetAttributes().Length) 1207Assert.Equal(1, prop.SetMethod.GetAttributes().Length) 1213Assert.Equal(3, mtd.GetAttributes().Length) 1323Dim attr = prop.GetAttributes().First() 1615Assert.Equal(expected, c.GetTypeByMetadataName("Test").GetAttributes().Single().ToString()) 1618Assert.Equal(expected, m.GlobalNamespace.GetTypeMember("Test").GetAttributes().Single().ToString())
SymbolsTests\Metadata\PE\LoadingNamespacesAndTypes.vb (1)
234Assert.Equal(0, collections.GetAttributes().Length())
SymbolsTests\Retargeting\NoPia.vb (24)
1119Dim args = attrTest1.GetAttributes()(0).CommonConstructorArguments 1130args = attrTest1.GetAttributes()(0).CommonConstructorArguments 1141args = attrTest1.GetAttributes()(0).CommonConstructorArguments 1152args = attrTest1.GetAttributes()(0).CommonConstructorArguments 1210Dim args = attrTest1.GetAttributes()(0).CommonConstructorArguments 1221args = attrTest1.GetAttributes()(0).CommonConstructorArguments 1232args = attrTest1.GetAttributes()(0).CommonConstructorArguments 1243args = attrTest1.GetAttributes()(0).CommonConstructorArguments 1301Dim args = attrTest1.GetAttributes()(0).CommonConstructorArguments 1312args = attrTest1.GetAttributes()(0).CommonConstructorArguments 1323args = attrTest1.GetAttributes()(0).CommonConstructorArguments 1334args = attrTest1.GetAttributes()(0).CommonConstructorArguments 1383Dim args = attrTest1.GetAttributes()(0).CommonConstructorArguments 1394args = attrTest1.GetAttributes()(0).CommonConstructorArguments 1453Dim args = attrTest1.GetAttributes()(0).CommonConstructorArguments 1464args = attrTest1.GetAttributes()(0).CommonConstructorArguments 1475args = attrTest1.GetAttributes()(0).CommonConstructorArguments 1486args = attrTest1.GetAttributes()(0).CommonConstructorArguments 1547Dim argType = DirectCast(type.GetAttributes()(0).CommonConstructorArguments(0).Value, TypeSymbol) 1551argType = DirectCast(type.GetAttributes()(0).CommonConstructorArguments(0).Value, TypeSymbol) 1555argType = DirectCast(type.GetAttributes()(0).CommonConstructorArguments(0).Value, TypeSymbol) 1562argType = DirectCast(type.GetAttributes()(0).CommonConstructorArguments(0).Value, TypeSymbol) 1565argType = DirectCast(type.GetAttributes()(0).CommonConstructorArguments(0).Value, TypeSymbol) 1569argType = DirectCast(type.GetAttributes()(0).CommonConstructorArguments(0).Value, TypeSymbol)
SymbolsTests\Retargeting\RetargetingCustomAttributes.vb (4)
109TestAttributeRetargeting(symbol.GetAttributes()) 274Dim attr = c.GetAttributes().Single() 320Dim a = c1.GetAttributes().Single() 363Dim a = c1.GetAttributes().Single()
SymbolsTests\Retargeting\RetargetingTests.vb (16)
978Assert.Equal(sourceType.GetAttributes.Length, retargetingType.GetAttributes.Length) 979Assert.Equal(0, sourceType.GetAttributes.Length) 989Assert.Equal(1, sourceType.GetAttributes.Length) 2367Assert.Equal(1, retargetingType.GetAttributes.Length) 2368Assert.Equal(sourceType.GetAttributes.Length, retargetingType.GetAttributes.Length) 2372Assert.Equal(1, retargetingType.GetAttributes.Length) 2373Assert.Equal(sourceType.GetAttributes.Length, retargetingType.GetAttributes.Length) 2378Assert.Equal(1, retargetingType.GetAttributes.Length) 2379Assert.Equal(sourceType.GetAttributes.Length, retargetingType.GetAttributes.Length) 2384Assert.Equal(2, retargetingType.GetAttributes.Length) 2385Assert.Equal(sourceType.GetAttributes.Length, retargetingType.GetAttributes.Length)
SymbolsTests\Source\ClsComplianceTests.vb (4)
1653AssertEx.Any(m.GetAttributes(), predicate) 1655AssertEx.None(m.GetAttributes(), predicate) 1659AssertEx.Any(m.ContainingAssembly.GetAttributes(), predicate) 1661AssertEx.None(m.ContainingAssembly.GetAttributes(), predicate)
SymbolsTests\Source\EventTests.vb (16)
646Dim attrs = member.GetAttributes() 652attrs = member.GetAttributes() 656attrs = member.GetAttributes() 660attrs = member.GetAttributes() 664attrs = member.GetAttributes() 669attrs = member.GetAttributes() 675attrs = member.GetAttributes() 679attrs = member.GetAttributes() 683attrs = member.GetAttributes() 693Dim attrs = member.GetAttributes() 703attrs = member.GetAttributes() 707attrs = member.GetAttributes() 712attrs = member.GetAttributes() 718attrs = member.GetAttributes() 724attrs = member.GetAttributes() 728attrs = member.GetAttributes()
SymbolsTests\Source\PropertyTests.vb (3)
2710Dim attribute = type.GetAttributes().Single() 8153Dim getterAttribute = [property].GetMethod.GetAttributes().Single() 8157Dim setterAttribute = [property].SetMethod.GetAttributes().Single()
SymbolsTests\Source\SyntheticEntryPoint.vb (1)
120Dim mainAttributes = m.GlobalNamespace.GetTypeMember("Test").GetMember("Main").GetAttributes()
SymbolsTests\Source\TypeTests.vb (3)
378Assert.Equal(0, sym5.GetAttributes().Length()) 3421i1.GetAttributes() 3473i1.GetAttributes()
SymbolsTests\SymbolErrorTests.vb (7)
2894Assert.Equal(0, GooParam.GetAttributes().Length) 2923Assert.Equal(0, GooParam.GetAttributes().Length) 2952Assert.Equal(0, GooParam.GetAttributes().Length) 2981Assert.Equal(0, GooParam.GetAttributes().Length) 3031Assert.Equal(0, GooParam.GetAttributes().Length) 3060Assert.Equal(0, GooParam.GetAttributes().Length) 21013Assert.Equal(0, sym.GetAttributes().Length()) ' Enumerable.Empty<SymbolAttribute>()
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (6)
Extensions.vb (6)
125Return this.GetAttributes().Where(Function(a) TypeSymbol.Equals(a.AttributeClass, c, TypeCompareKind.ConsiderEverything)).First() 130Return this.GetAttributes().Where(Function(a) a.AttributeConstructor = m).First() 135Return this.GetAttributes().Where(Function(a) TypeSymbol.Equals(a.AttributeClass, c, TypeCompareKind.ConsiderEverything)) 140Return this.GetAttributes().Where(Function(a) a.AttributeConstructor = m) 145Return this.GetAttributes().Where(Function(a) a.IsTargetAttribute(namespaceName, typeName)) 150Return this.GetAttributes().Where(Function(a) a.IsTargetAttribute(this, description))