3 types derived from EventSymbol
Microsoft.CodeAnalysis.CSharp (3)
Symbols\Metadata\PE\PEEventSymbol.cs (1)
24internal sealed class PEEventSymbol : EventSymbol
Symbols\Source\SourceEventSymbol.cs (1)
23internal abstract class SourceEventSymbol : EventSymbol, IAttributeTargetSymbol
Symbols\Wrapped\WrappedEventSymbol.cs (1)
20internal abstract class WrappedEventSymbol : EventSymbol
226 references to EventSymbol
Microsoft.CodeAnalysis.CSharp (226)
Binder\Binder.ValueChecks.cs (3)
1521var eventSymbol = eventAccess.EventSymbol; 1545EventSymbol eventSymbol = boundEvent.EventSymbol; 3407var eventSymbol = eventAccess.EventSymbol;
Binder\Binder_Expressions.cs (4)
2174return BindEventAccess(node, receiver, (EventSymbol)symbol, diagnostics, resultKind, hasErrors: isError); 8181resultType = ((EventSymbol)symbolOpt).Type; 8317result = BindEventAccess(node, left, (EventSymbol)symbol, diagnostics, lookupResult.Kind, hasErrors: wasError); 8756EventSymbol eventSymbol,
Binder\Binder_Lookup.cs (2)
1558var @event = ((EventSymbol)symbol).GetLeastOverriddenEvent(this.ContainingType);
Binder\Binder_Operators.cs (2)
264EventSymbol eventSymbol = left.EventSymbol; 2589EventSymbol eventSymbol = eventAccess.EventSymbol;
Binder\Binder_Statements.cs (3)
1748private DiagnosticInfo GetBadEventUsageDiagnosticInfo(EventSymbol eventSymbol) 1750var leastOverridden = (EventSymbol)eventSymbol.GetLeastOverriddenMember(this.ContainingType);
Binder\Semantics\OverloadResolution\OverloadResolution.cs (1)
547case EventSymbol @event:
BoundTree\BoundExpressionExtensions.cs (1)
72EventSymbol => RefKind.None,
Compilation\CSharpSemanticModel.cs (2)
1836public bool IsEventUsableAsField(int position, EventSymbol symbol) 3498var eventSymbol = eventAssignment.Event;
Compilation\SyntaxTreeSemanticModel.cs (2)
1269return (declaredSymbol.GetSymbol<EventSymbol>()).AssociatedField; 1554return ((EventSymbol)GetDeclaredMemberSymbol(declarationSyntax)).GetPublicSymbol();
Compiler\ClsComplianceChecker.cs (2)
379public override void VisitEvent(EventSymbol symbol) 729type = ((EventSymbol)symbol).Type;
Compiler\MethodCompiler.cs (1)
875public override object VisitEvent(EventSymbol symbol, TypeCompilationState argument)
DocumentationComments\DocumentationCommentIDVisitor.cs (1)
53public override object VisitEvent(EventSymbol symbol, StringBuilder builder)
DocumentationComments\DocumentationCommentIDVisitor.PartVisitor.cs (1)
139public override object VisitEvent(EventSymbol symbol, StringBuilder builder)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (3)
166public override Symbol? VisitEvent(EventSymbol symbol) 576private bool AreEventsEqual(EventSymbol @event, EventSymbol other)
Emitter\Model\EventSymbolAdapter.cs (2)
202internal EventSymbolAdapter(EventSymbol underlyingEventSymbol) 208internal EventSymbol AdaptedEventSymbol { get; }
Emitter\Model\NamedTypeSymbolAdapter.cs (3)
305foreach (EventSymbol e in AdaptedNamedTypeSymbol.GetEventsToEmit()) 938internal virtual IEnumerable<EventSymbol> GetEventsToEmit() 946yield return (EventSymbol)m;
Emitter\Model\PEModuleBuilder.cs (1)
418FieldSymbol field = ((EventSymbol)member).AssociatedField;
Emitter\NoPia\EmbeddedType.cs (1)
311TypeManager.EmbedEvent(this, ((EventSymbol)s).GetCciAdapter(), syntaxNodeOpt, diagnostics, isUsedForComAwareEventBinding: false);
Emitter\NoPia\EmbeddedTypesManager.cs (1)
518EmbedEvent(type, ((EventSymbol)propertyOrEvent).GetCciAdapter(), syntaxNodeOpt, diagnostics, isUsedForComAwareEventBinding: false);
FlowAnalysis\DefiniteAssignment.cs (1)
1091var eventSymbol = eventAccess.EventSymbol;
FlowAnalysis\EmptyStructTypeCache.cs (2)
208var eventSymbol = (EventSymbol)member;
FlowAnalysis\NullableWalker.cs (4)
730case EventSymbol e: 1965var eventSymbol = eventAccess.EventSymbol; 11684var @event = node.Event; 11687@event = (EventSymbol)AsMemberOfType(ResultType.Type, @event);
Generated\BoundNodes.xml.Generated.cs (8)
6199public BoundEventAssignmentOperator(SyntaxNode syntax, EventSymbol @event, bool isAddition, bool isDynamic, BoundExpression? receiverOpt, BoundExpression argument, TypeSymbol type, bool hasErrors = false) 6215public EventSymbol Event { get; } 6224public BoundEventAssignmentOperator Update(EventSymbol @event, bool isAddition, bool isDynamic, BoundExpression? receiverOpt, BoundExpression argument, TypeSymbol type) 7376public BoundEventAccess(SyntaxNode syntax, BoundExpression? receiverOpt, EventSymbol eventSymbol, bool isUsableAsField, LookupResultKind resultKind, TypeSymbol type, bool hasErrors = false) 7391public EventSymbol EventSymbol { get; } 7398public BoundEventAccess Update(BoundExpression? receiverOpt, EventSymbol eventSymbol, bool isUsableAsField, LookupResultKind resultKind, TypeSymbol type) 13951EventSymbol @event = GetUpdatedSymbol(node, node.Event); 14468EventSymbol eventSymbol = GetUpdatedSymbol(node, node.EventSymbol);
Lowering\ClosureConversion\ExpressionLambdaRewriter.cs (2)
918return _bound.Convert(MemberInfoType, _bound.FieldInfo(((EventSymbol)symbol).AssociatedField)); 933return _bound.Convert(MemberInfoType, _bound.FieldInfo(((EventSymbol)symbol).AssociatedField));
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (1)
160{ AssociatedSymbol: EventSymbol { IsDirectlyExcludedFromCodeCoverage: true } } => true,
Lowering\LocalRewriter\LocalRewriter_Event.cs (3)
87private BoundExpression RewriteWindowsRuntimeEventAssignmentOperator(SyntaxNode syntax, EventSymbol eventSymbol, EventAssignmentKind kind, BoundExpression? rewrittenReceiverOpt, BoundExpression rewrittenArgument) 195EventSymbol eventSymbol = left.EventSymbol; 222EventSymbol eventSymbol,
Lowering\LocalRewriter\LocalRewriter_ObjectOrCollectionInitializerExpression.cs (2)
708var eventSymbol = (EventSymbol)memberSymbol;
Operations\CSharpOperationFactory.cs (2)
874var eventSymbol = (EventSymbol)memberSymbol;
Symbols\BaseTypeAnalysis.cs (2)
188Debug.Assert((object)(field.AssociatedSymbol as EventSymbol) == null, 192field = ((EventSymbol)member).AssociatedField;
Symbols\EventSymbol.cs (11)
34public new virtual EventSymbol OriginalDefinition 133public EventSymbol? OverriddenEvent 141return (EventSymbol)OverriddenOrHiddenMembers.GetOverriddenMember(); 144return (EventSymbol)OverriddenOrHiddenMembersResult.GetOverriddenMember(this, OriginalDefinition.OverriddenEvent); 167internal EventSymbol GetLeastOverriddenEvent(NamedTypeSymbol? accessingTypeOpt) 170EventSymbol e = this; 193EventSymbol? overridden = e.OverriddenEvent; 229public abstract ImmutableArray<EventSymbol> ExplicitInterfaceImplementations { get; } 260internal EventSymbol AsMember(NamedTypeSymbol newOwner) 332EventSymbol? other = obj as EventSymbol;
Symbols\EventSymbolExtensions.cs (1)
15internal static MethodSymbol GetOwnOrInheritedAccessor(this EventSymbol @event, bool isAdder)
Symbols\MemberSymbolExtensions.cs (15)
138var eventSymbol = (EventSymbol)symbol; 230return ((EventSymbol)m).CustomModifierCount(); 240public static int CustomModifierCount(this EventSymbol e) 280return ((EventSymbol)s).AsMember(newOwner); 493internal static MethodSymbol GetOwnOrInheritedAddMethod(this EventSymbol @event) 517internal static MethodSymbol GetOwnOrInheritedRemoveMethod(this EventSymbol @event) 542return ((EventSymbol)member).IsExplicitInterfaceImplementation; 585return ((EventSymbol)member).Type.ContainsTupleNames(); 601return ((EventSymbol)member).ExplicitInterfaceImplementations.Cast<EventSymbol, Symbol>(); 616return ((EventSymbol)member).OverriddenEvent; 635var evnt = (EventSymbol)member; 651field = ((EventSymbol)member).AssociatedField;
Symbols\Metadata\PE\PEEventSymbol.cs (4)
379public override ImmutableArray<EventSymbol> ExplicitInterfaceImplementations 386return ImmutableArray<EventSymbol>.Empty; 396var builder = ArrayBuilder<EventSymbol>.GetInstance(); 398foreach (var @event in implementedEvents)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (3)
997foreach (var eventSymbol in GetEventsToEmit()) 1160internal override IEnumerable<EventSymbol> GetEventsToEmit() 1162return GetMembers<EventSymbol>(this.GetMembers(), SymbolKind.Event);
Symbols\OverriddenOrHiddenMembersHelpers.cs (11)
34internal static OverriddenOrHiddenMembersResult MakeOverriddenOrHiddenMembers(this EventSymbol member) 107return MakeEventAccessorOverriddenOrHiddenMembers(accessor, (EventSymbol)associatedPropertyOrEvent); 333private static OverriddenOrHiddenMembersResult MakeEventAccessorOverriddenOrHiddenMembers(MethodSymbol accessor, EventSymbol associatedEvent) 351EventSymbol eventHiddenByEvent = (EventSymbol)hiddenByEvent; 363EventSymbol eventOverriddenByEvent = (EventSymbol)hiddenOrOverriddenByEvent.OverriddenMembers[0]; 902EventSymbol @event = (EventSymbol)member; 920EventSymbol @event = (EventSymbol)member;
Symbols\PropertyOrEventSymbolExtensions.cs (2)
26internal static ISet<EventSymbol> GetEventsForExplicitlyImplementedAccessor(MethodSymbol accessor) 28return GetSymbolsForExplicitlyImplementedAccessor<EventSymbol>(accessor);
Symbols\PublicModel\EventSymbol.cs (3)
13private readonly Symbols.EventSymbol _underlying; 16public EventSymbol(Symbols.EventSymbol underlying) 23internal Symbols.EventSymbol UnderlyingEventSymbol => _underlying;
Symbols\Retargeting\RetargetingEventSymbol.cs (7)
28private ImmutableArray<EventSymbol> _lazyExplicitInterfaceImplementations; 32public RetargetingEventSymbol(RetargetingModuleSymbol retargetingModule, EventSymbol underlyingEvent) 92public override ImmutableArray<EventSymbol> ExplicitInterfaceImplementations 101default(ImmutableArray<EventSymbol>)); 107private ImmutableArray<EventSymbol> RetargetExplicitInterfaceImplementations() 118var builder = ArrayBuilder<EventSymbol>.GetInstance(); 122var retargeted = this.RetargetingTranslator.Retarget(impls[i]);
Symbols\Retargeting\RetargetingNamedTypeSymbol.cs (2)
176internal override IEnumerable<EventSymbol> GetEventsToEmit() 178foreach (EventSymbol e in _underlyingType.GetEventsToEmit())
Symbols\Retargeting\RetargetingSymbolTranslator.cs (9)
95return new RetargetingEventSymbol(this, (EventSymbol)symbol); 948public EventSymbol Retarget(EventSymbol @event) 952return (EventSymbol)this.SymbolMap.GetOrAdd(@event, _retargetingModule._createRetargetingEvent); 1110private EventSymbol FindEventInRetargetedType(EventSymbol @event, NamedTypeSymbol retargetedType) 1118var retargetedEvent = (EventSymbol)retargetedMember; 1379public override Symbol VisitEvent(EventSymbol symbol, RetargetOptions options)
Symbols\Source\ExplicitInterfaceHelpers.cs (5)
165internal static EventSymbol FindExplicitlyImplementedEvent( 166this EventSymbol implementingEvent, 172return (EventSymbol)FindExplicitlyImplementedMember(implementingEvent, isOperator: false, explicitInterfaceType, interfaceEventName, explicitInterfaceSpecifierSyntax, diagnostics); 323var eventSymbol = (EventSymbol)implementedMember;
Symbols\Source\SourceCustomEventAccessorSymbol.cs (1)
25EventSymbol explicitlyImplementedEventOpt,
Symbols\Source\SourceCustomEventSymbol.cs (8)
24private readonly ImmutableArray<EventSymbol> _explicitInterfaceImplementations; 40var explicitlyImplementedEvent = this.FindExplicitlyImplementedEvent(_explicitInterfaceType, nameToken.ValueText, interfaceSpecifier, diagnostics); 64EventSymbol? overriddenEvent = this.OverriddenEvent; 169ImmutableArray<EventSymbol>.Empty : 170ImmutableArray.Create<EventSymbol>(explicitlyImplementedEvent); 208public override ImmutableArray<EventSymbol> ExplicitInterfaceImplementations 227EventSymbol explicitlyImplementedEvent = _explicitInterfaceImplementations[0]; 234EventSymbol? explicitlyImplementedEventOpt, string? aliasQualifierOpt, BindingDiagnosticBag diagnostics)
Symbols\Source\SourceEventAccessorSymbol.cs (2)
28EventSymbol explicitlyImplementedEventOpt, 218EventSymbol overriddenEvent = @event.OverriddenEvent;
Symbols\Source\SourceEventSymbol.cs (7)
89public abstract override ImmutableArray<EventSymbol> ExplicitInterfaceImplementations { get; } 623protected static void CopyEventCustomModifiers(EventSymbol eventWithCustomModifiers, ref TypeWithAnnotations type, AssemblySymbol containingAssembly) 668ImmutableArray<EventSymbol> explicitInterfaceImplementations = this.ExplicitInterfaceImplementations; 687EventSymbol? overriddenEvent = this.OverriddenEvent; 713if (((EventSymbol)interfaceMember).IsWindowsRuntimeEvent) 767EventSymbol? explicitlyImplementedEvent = ExplicitInterfaceImplementations.FirstOrDefault(); 776private void CheckExplicitImplementationAccessor(MethodSymbol? thisAccessor, MethodSymbol? otherAccessor, EventSymbol explicitlyImplementedEvent, BindingDiagnosticBag diagnostics)
Symbols\Source\SourceFieldLikeEventSymbol.cs (3)
56EventSymbol? overriddenEvent = this.OverriddenEvent; 172public override ImmutableArray<EventSymbol> ExplicitInterfaceImplementations 174get { return ImmutableArray<EventSymbol>.Empty; }
Symbols\Source\SourceMemberContainerSymbol.cs (12)
1531FieldSymbol? associatedField = ((EventSymbol)m).AssociatedField; 1692else if (member is FieldSymbol field && field.AssociatedSymbol is EventSymbol e) 2331var eventSymbol = (EventSymbol)symbol; 2390Debug.Assert(field.AssociatedSymbol is not EventSymbol, "Didn't expect to find a field-like event backing field in the member list."); 2393field = ((EventSymbol)member).AssociatedField; 2690Debug.Assert(f.AssociatedSymbol is not EventSymbol, "Didn't expect to find a field-like event backing field in the member list."); 2693f = ((EventSymbol)m).AssociatedField; 3881EventSymbol eventSymbol, 3924private static Location GetAccessorOrEventLocation(EventSymbol propertySymbol, bool isAdder) 3965private static bool ParametersMatchEventAccessor(EventSymbol eventSymbol, ImmutableArray<ParameterSymbol> methodParams) 4195case EventSymbol:
Symbols\Source\SourceMemberContainerSymbol_ImplementationChecks.cs (18)
209EventSymbol interfaceEvent = (EventSymbol)interfaceMember; 210EventSymbol implementingEvent = (EventSymbol)implementingMember; 211EventSymbol maybeWinRTEvent; 212EventSymbol maybeRegularEvent; 427((EventSymbol)interfacePropertyOrEvent).IsWindowsRuntimeEvent != ((EventSymbol)implementingPropertyOrEvent).IsWindowsRuntimeEvent) 611var @event = (EventSymbol)member; 950EventSymbol overridingEvent = (EventSymbol)overridingMember; 951EventSymbol overriddenEvent = (EventSymbol)overriddenMember; 1532EventSymbol overriddenEvent, 1533EventSymbol overridingEvent, 1535Action<BindingDiagnosticBag, EventSymbol, EventSymbol, TArg> reportMismatch,
Symbols\Source\SourceMemberFieldSymbol.cs (2)
465EventSymbol @event = (EventSymbol)associatedPropertyOrEvent;
Symbols\SubstitutedEventSymbol.cs (5)
17internal SubstitutedEventSymbol(SubstitutedNamedTypeSymbol containingType, EventSymbol originalDefinition) 46public override EventSymbol OriginalDefinition 92private ImmutableArray<EventSymbol> _lazyExplicitInterfaceImplementations; 96public override ImmutableArray<EventSymbol> ExplicitInterfaceImplementations 105default(ImmutableArray<EventSymbol>));
Symbols\SubstitutedNamedTypeSymbol.cs (1)
457internal override IEnumerable<EventSymbol> GetEventsToEmit()
Symbols\Symbol.cs (1)
1639builder.AddValue(((EventSymbol)this).TypeWithAnnotations);
Symbols\SymbolExtensions.cs (8)
337return ((EventSymbol)symbol).MustCallMethodsDirectly; 438internal static EventSymbol? EnsureCSharpSymbolOrNull(this IEventSymbol? symbol, string paramName) 440return (EventSymbol?)EnsureCSharpSymbolOrNull((ISymbol?)symbol, paramName); 511EventSymbol @event = (EventSymbol)symbol; 550SymbolKind.Event => ((EventSymbol)symbol).RequiresInstanceReceiver, 683internal static IEventSymbol? GetPublicSymbol(this EventSymbol? symbol) 729internal static ImmutableArray<IEventSymbol> GetPublicSymbols(this ImmutableArray<EventSymbol> symbols)
Symbols\SymbolVisitor.cs (1)
50public virtual void VisitEvent(EventSymbol symbol)
Symbols\SymbolVisitor`1.cs (1)
50public virtual TResult VisitEvent(EventSymbol symbol)
Symbols\SymbolVisitor`2.cs (2)
221/// Called when visiting an <see cref="EventSymbol" />; Override this with specific 227public virtual TResult VisitEvent(EventSymbol symbol, TArgument argument)
Symbols\Synthesized\SynthesizedEventAccessorSymbol.cs (1)
28internal SynthesizedEventAccessorSymbol(SourceEventSymbol @event, bool isAdder, bool isExpressionBodied, EventSymbol explicitlyImplementedEventOpt = null, string aliasQualifierOpt = null)
Symbols\Tuples\TupleTypeSymbol.cs (2)
1078var underlyingEvent = (EventSymbol)member;
Symbols\TypeSymbol.cs (10)
1412EventSymbol interfaceEvent = (EventSymbol)interfaceMember; 1570correspondingImplementingAccessor = ((EventSymbol)implementingPropertyOrEvent).GetOwnOrInheritedAddMethod(); 1573correspondingImplementingAccessor = ((EventSymbol)implementingPropertyOrEvent).GetOwnOrInheritedRemoveMethod(); 1771var implementingEvent = (EventSymbol)implementingMember; 1772var implementedEvent = (EventSymbol)interfaceMember; 2017interfaceMemberReturnType = ((EventSymbol)interfaceMember).Type; 2412overriddenMember = ((EventSymbol)member).OverriddenEvent;
Symbols\VarianceSafety.cs (2)
59CheckEventVarianceSafety((EventSymbol)member, diagnostics); 216private static void CheckEventVarianceSafety(EventSymbol @event, BindingDiagnosticBag diagnostics)
Symbols\Wrapped\WrappedEventSymbol.cs (3)
25protected readonly EventSymbol _underlyingEvent; 27public WrappedEventSymbol(EventSymbol underlyingEvent) 33public EventSymbol UnderlyingEvent