Class CsEvent
Data model that represents the definition of an event.
Implements
Inherited Members
Namespace: CodeFactory.DotNet.CSharp
Assembly: CodeFactory.DotNet.dll
Syntax
public abstract class CsEvent : CsMember, ICsEvent, ICsMember, ICsModel, ICsAttributes, IParent, IDotNetEvent, IDotNetMember, IDotNetModel, IModelStatus, ISourceFiles, IDotNetAttributes, IDocumentation, IParent, ILookup
Constructors
| Improve this Doc View SourceCsEvent(bool, bool, bool, SourceCodeType, IReadOnlyList<CsAttribute>, string, IReadOnlyList<string>, bool, string, string, string, string, CsSecurity, bool, bool, bool, bool, bool, CsDelegate, CsMethod, CsMethod, CsMethod, CsType, string, ModelStore<ICsModel>, IReadOnlyList<ModelLoadException>)
Constructor for the CsEvent
Declaration
protected CsEvent(bool isLoaded, bool hasErrors, bool loadedFromSource, SourceCodeType language, IReadOnlyList<CsAttribute> attributes, string modelSourceFile, IReadOnlyList<string> sourceFiles, bool hasDocumentation, string documentation, string lookupPath, string name, string parentPath, CsSecurity security, bool isAbstract, bool isVirtual, bool isOverride, bool isSealed, bool isStatic, CsDelegate eventHandlerDelegate, CsMethod raiseMethod, CsMethod addMethod, CsMethod removeMethod, CsType eventType, string sourceDocument = null, ModelStore<ICsModel> modelStore = null, IReadOnlyList<ModelLoadException> modelErrors = null)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | isLoaded | Flag that determines if the model was loaded. |
| bool | hasErrors | Flag that determine if errors were found creating the model. |
| bool | loadedFromSource | Flag that determines if the model was loaded from source code or from an existing library. |
| SourceCodeType | language | The target language the model was generated from. |
| IReadOnlyList<CsAttribute> | attributes | List of the attributes assigned to this model. |
| string | modelSourceFile | The source file the model was generated from. |
| IReadOnlyList<string> | sourceFiles | List of the fully qualified paths to the source code files this member is defined in. |
| bool | hasDocumentation | Flag that determines if the model has XML documentation assigned to it. |
| string | documentation | The xml documentation assigned to the model. |
| string | lookupPath | The fully qualified model lookup path for this model. |
| string | name | The name of the model. |
| string | parentPath | THe fully qualified lookup path for the parent model to this one. |
| CsSecurity | security | The security scope assigned to this model. |
| bool | isAbstract | Flag that determines if the model is abstract. |
| bool | isVirtual | Flag that determines if the model is virtual. |
| bool | isOverride | Flag that determines if the model is overridden. |
| bool | isSealed | Flag that determines if the model is sealed. |
| bool | isStatic | Flag that determines if the model is static. |
| CsDelegate | eventHandlerDelegate | Delegate model for this event. |
| CsMethod | raiseMethod | Model for the raise method for this event. |
| CsMethod | addMethod | Model for the add method for this event. |
| CsMethod | removeMethod | Model for the remove method for this event. |
| CsType | eventType | The type definition that supports this event. |
| string | sourceDocument | The source document that was used to build this model. This is optional parameter and can be null. |
| ModelStore<ICsModel> | modelStore | Optional the lookup storage for models created during the compile or lookup of the model. |
| IReadOnlyList<ModelLoadException> | modelErrors | Optional the error that occurred while creating the model. |
Properties
| Improve this Doc View SourceAddMethod
The method that adds a subscription to the event.
Declaration
public CsMethod AddMethod { get; }
Property Value
| Type | Description |
|---|---|
| CsMethod |
EventHandlerDelegate
The event handler delegate used by the event.
Declaration
public CsDelegate EventHandlerDelegate { get; }
Property Value
| Type | Description |
|---|---|
| CsDelegate |
EventType
The event handler type that is assigned to the event.
Declaration
public CsType EventType { get; }
Property Value
| Type | Description |
|---|---|
| CsType |
IsAbstract
Flag that determines if the event has been implemented as an abstract event.
Declaration
public bool IsAbstract { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsOverride
Flag that determines if the event has been overridden.
Declaration
public bool IsOverride { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsSealed
Flag that determines if the event has been sealed.
Declaration
public bool IsSealed { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsStatic
Flag that determines if the event is static.
Declaration
public bool IsStatic { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsVirtual
Flag that determines if the event is implemented as virtual.
Declaration
public bool IsVirtual { get; }
Property Value
| Type | Description |
|---|---|
| bool |
RaiseMethod
The method definition to raise the event.
Declaration
public CsMethod RaiseMethod { get; }
Property Value
| Type | Description |
|---|---|
| CsMethod |
RemoveMethod
The method that removes a subscription to the event.
Declaration
public CsMethod RemoveMethod { get; }
Property Value
| Type | Description |
|---|---|
| CsMethod |
Explicit Interface Implementations
| Improve this Doc View SourceIDotNetEvent.AddMethod
The method that adds a subscription to the event.
Declaration
IDotNetMethod IDotNetEvent.AddMethod { get; }
Returns
| Type | Description |
|---|---|
| IDotNetMethod |
IDotNetEvent.EventHandlerDelegate
The event handler delegate used by the event.
Declaration
IDotNetDelegate IDotNetEvent.EventHandlerDelegate { get; }
Returns
| Type | Description |
|---|---|
| IDotNetDelegate |
IDotNetEvent.EventType
The event handler type that is assigned to the event.
Declaration
IDotNetType IDotNetEvent.EventType { get; }
Returns
| Type | Description |
|---|---|
| IDotNetType |
IDotNetEvent.RaiseMethod
The method definition to raise the event.
Declaration
IDotNetMethod IDotNetEvent.RaiseMethod { get; }
Returns
| Type | Description |
|---|---|
| IDotNetMethod |
IDotNetEvent.RemoveMethod
The method that removes a subscription to the event.
Declaration
IDotNetMethod IDotNetEvent.RemoveMethod { get; }
Returns
| Type | Description |
|---|---|
| IDotNetMethod |