Class SourceGenEventShape<TDeclaringType, TEventHandler>
- Namespace
- PolyType.SourceGenModel
- Assembly
- PolyType.dll
Source generator model for event shapes.
public sealed class SourceGenEventShape<TDeclaringType, TEventHandler> : IEventShape<TDeclaringType, TEventHandler>, IEventShape
Type Parameters
TDeclaringType
The type declaring the event.
TEventHandler
The type of the event handler.
- Inheritance
-
SourceGenEventShape<TDeclaringType, TEventHandler>
- Implements
-
IEventShape<TDeclaringType, TEventHandler>
- Inherited Members
Properties
AddHandler
Gets the delegate that adds an event handler to the event.
public required Setter<TDeclaringType?, TEventHandler> AddHandler { get; init; }
Property Value
- Setter<TDeclaringType, TEventHandler>
AttributeProviderFunc
Gets a constructor delegate for the custom attribute provider of the event.
public Func<ICustomAttributeProvider?>? AttributeProviderFunc { get; init; }
Property Value
DeclaringType
Gets the shape of the declaring type.
public required ITypeShape<TDeclaringType> DeclaringType { get; init; }
Property Value
- ITypeShape<TDeclaringType>
HandlerType
Gets the shape of the event handler type.
public required IFunctionTypeShape HandlerType { get; init; }
Property Value
IsPublic
Gets a value indicating whether the add method is declared public.
public required bool IsPublic { get; init; }
Property Value
IsStatic
Gets a value indicating whether the event is static.
public required bool IsStatic { get; init; }
Property Value
Name
Gets the name of the event.
public required string Name { get; init; }
Property Value
RemoveHandler
Gets the delegate that removes an event handler from the event.
public required Setter<TDeclaringType?, TEventHandler> RemoveHandler { get; init; }
Property Value
- Setter<TDeclaringType, TEventHandler>