Pluginer 2.0.1

dotnet add package Pluginer --version 2.0.1
                    
NuGet\Install-Package Pluginer -Version 2.0.1
                    
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="Pluginer" Version="2.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Pluginer" Version="2.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Pluginer" />
                    
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 Pluginer --version 2.0.1
                    
#r "nuget: Pluginer, 2.0.1"
                    
#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 Pluginer@2.0.1
                    
#: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=Pluginer&version=2.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Pluginer&version=2.0.1
                    
Install as a Cake Tool

Pluginer

Run dll files as a plugin

Install Nuget

Install-Package Pluginer -Version 2.0.1

How to Work

  • Pluginer used to run dll files inside a path.
  • Each plugin file (dll) can be placed directly in the plugins path or it can be placed in a seperate folder in the plugins path with the same name as the plugin
  • The default plugins path is Plugins folder in the application root path
  • By default, the Pluginer will instance only classes that inherit from Pluginer.PluginObject. you can change it by assigning parents parameter in the PluginRunner constructor. in addition when parents are empty, Pluginer create object for each classes.

Example

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Pluginer;

namespace PluginerDemo
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            var pr = new PluginRunner();
            pr.OnLoadClass += Pr_OnLoadClass;
            pr.OnLoadPlugin += Pr_OnLoadPlugin;
            pr.OnError += Pr_OnError;
            var args = new PluginArgs();
            args["form"] = this;
            pr.Load(args);
        }

        private void Pr_OnLoadPlugin(PluginRunner runner, PluginEventArgs e)
        {
            rtb.AppendText($"> The plugin `{e.Plugin.Name}` Loaded.\n");
        }

        private void Pr_OnLoadClass(PluginRunner runner, PluginEventArgs e)
        {
            rtb.AppendText($"> The class : `{e.Type}` Loaded from plugin `{e.Plugin.Name}`\n");
        }

        private void Pr_OnError(PluginRunner runner, PluginEventArgs e)
        {
            rtb.AppendText($"> Error Plugin `{e.Plugin.Name}`: `{e.Error.Message}`\n");
        }

    }
}

Sample Plugin

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ClassLibrary1
{
    public class Class1 : Pluginer.PluginObject
    {

        public Class1(Pluginer.PluginArgs args)
        {
            MessageBox.Show("Hi");
            dynamic form = args["form"];
            form.menuStrip1.Items.Add("Menu 1");
            form.menuStrip1.Items.Add("Menu 2");
            form.menuStrip1.Items.Add("Menu 3");
            form.menuStrip1.Items.Add("Menu 4");
            form.menuStrip1.Items.Add("Menu 5");
            //Notice: don't forgot to change menuStrip1 control Modifiers to public
        }

    }
}

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net5.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
2.0.1 577 1/19/2022