ModuleEventRaiser.Generator 1.0.11

There is a newer version of this package available.
See the version list below for details.
dotnet add package ModuleEventRaiser.Generator --version 1.0.11
                    
NuGet\Install-Package ModuleEventRaiser.Generator -Version 1.0.11
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ModuleEventRaiser.Generator" Version="1.0.11" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ModuleEventRaiser.Generator" Version="1.0.11" />
                    
Directory.Packages.props
<PackageReference Include="ModuleEventRaiser.Generator" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ModuleEventRaiser.Generator --version 1.0.11
                    
#r "nuget: ModuleEventRaiser.Generator, 1.0.11"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ModuleEventRaiser.Generator@1.0.11
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ModuleEventRaiser.Generator&version=1.0.11
                    
Install as a Cake Addin
#tool nuget:?package=ModuleEventRaiser.Generator&version=1.0.11
                    
Install as a Cake Tool

ModuleEventRaiser.Generator

A lightweight VB.NET source generator that automatically creates RaiseEvent helper methods for events declared in Modules. Asynchronous event raising methods (RaiseEventAsync_xxx) are supported in version 1.0.9 and later.

⚠️ Important Version Note

Please use version 1.0.6 or later. Versions 1.0.0 through 1.0.5 had packaging issues that prevented them from working correctly as source generators. Only versions 1.0.6 and above are fully functional.

  • Versions 1.0.6–1.0.7: Provide basic event raising methods only (no asynchronous support)
  • Version 1.0.8 is unlisted because it makes no functional changes
  • Versions 1.0.9–1.0.11: Add support for asynchronous event raising methods (internal code cleanup only, no user-facing changes between these versions)

💡 Recommendation: If you have an older version installed, please update to version 1.0.9 or later to take advantage of async support. See the Installation section for details.

Features

  • Automatically generate RaiseEvent_xxx methods for Module events
  • Supports any event parameter types (Double, String, custom classes, etc.)
  • Zero runtime dependencies
  • Compile-time only code generation
  • Clean and easy to use
  • Automatically adds required Imports for recognized types
  • RaiseEventAsync_xxx methods for asynchronous event raising (available in version 1.0.9+)

Usage Example

Define your events in a partial module (like MyEvents.vb):

Partial Public Module MyEvents
    Public Event TemperatureChanged(temperature As Double)
    Public Event HumidityChanged(humidity As Double)
    Public Event LightLevelChanged(lightLevel As Integer)
End Module

The generator automatically creates:

Partial Public Module MyEvents
    Public Sub RaiseEvent_TemperatureChanged(temperature As Double)
        RaiseEvent TemperatureChanged(temperature)
    End Sub

    Public Sub RaiseEvent_HumidityChanged(humidity As Double)
        RaiseEvent HumidityChanged(humidity)
    End Sub

    Public Sub RaiseEvent_LightLevelChanged(lightLevel As Integer)
        RaiseEvent LightLevelChanged(lightLevel)
    End Sub

    ' --- Asynchronous event raising methods (available in version 1.0.9+) ---
    Public Async Function RaiseEventAsync_TemperatureChanged(temperature As Double) As Task
        Await Task.Run(Sub() RaiseEvent TemperatureChanged(temperature))
    End Function

    Public Async Function RaiseEventAsync_HumidityChanged(humidity As Double) As Task
        Await Task.Run(Sub() RaiseEvent HumidityChanged(humidity))
    End Function

    Public Async Function RaiseEventAsync_LightLevelChanged(lightLevel As Integer) As Task
        Await Task.Run(Sub() RaiseEvent LightLevelChanged(lightLevel))
    End Function
End Module

Installation

Install via NuGet Package Manager:

Install-Package ModuleEventRaiser.Generator

Or via .NET CLI:

dotnet add package ModuleEventRaiser.Generator

License

BSD 3-Clause License

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 101 4/27/2026
1.1.8 109 4/10/2026
1.1.7.10 99 4/7/2026
1.1.7.9 104 4/3/2026
1.1.7.4 102 4/1/2026
1.1.7.3 107 3/28/2026
1.1.7.2 98 2/26/2026
1.1.7 97 2/26/2026
1.1.6 102 2/20/2026
1.1.5 105 2/17/2026
1.1.4 102 2/16/2026
1.1.3 103 2/16/2026
1.1.2 100 2/16/2026
1.0.11 108 2/16/2026
1.0.10 126 2/15/2026
1.0.9 99 2/15/2026
Loading failed