GitXplorerGitXplorer
S

Plugins

public
1 stars
1 forks
0 issues

Commits

List of commits on branch master.
Unverified
b51ba0eec2f505e5bc1e48f243dd91f28dd389a0

Support loading plugin locations from local and remote files

SSlord6 committed 5 years ago
Unverified
684d3470c8c881dbc6b88061594529f160e04560

Readme update for project referencing XML

SSlord6 committed 5 years ago
Unverified
e2b3b0cb5e9e975403eba0b1d641dbf9f1f7ef1a

Plugins downloading from remote now replaces a local plugin with the same name if present

SSlord6 committed 5 years ago
Unverified
4ab16818ca5b5cf241ba2817ea35e53b5c2d1787

--targetPlugins is now reductive rather than selective

SSlord6 committed 5 years ago
Unverified
4320a593de5dd7b6d2709f8d9ae3f599f33410ab

Fix --targetPlugins not being recognised as a valid arg

SSlord6 committed 5 years ago
Unverified
0be493d2f6a8e32ad822f9f04500cfc71ecbc9f4

Added arg parsing system

SSlord6 committed 5 years ago

README

The README file for this repository.

Plugins

C# Plugin System

Write a plugin

  • For a new project, add a reference to the PluginBase project
  • Ensure project XML includes
<ItemGroup>
      <ProjectReference Include="path\to\PluginBase.csproj">
          <Private>false</Private>
          <ExcludeAssets>runtime</ExcludeAssets>
      </ProjectReference>
  </ItemGroup>
  • Create a new class (or classes) which implements IPlugin

Order of execution

  • OnLoad is called as soon as the plugin is instantiated.
  • CreateTask may be called at any time after OnLoad and before OnUnload. The returned task should implement the desired behaviour of the plugin. CreateTask may return a PluginResultData object or null.
  • OnUnload may be called at any time after OnLoad. Note that it may be called before CreateTask, whilst a task is still running or after it has completed.

PluginApp Arguments

--help for in-tool help

--pluginLocations - List of locations to load plugins from, can be a filepath or URI - see "Loading remote plugins" below

--targetPlugins - List of plugin names to run. If not provided all plugins are run.

--pluginLocationsFile - List of files from which to load plugin paths. May be local or remote files. Each path should be on a new line.

Loading remote plugins

The PluginHandler will accept remote URIs for plugins. The URI must contain the name of the assembly as the last part of the path. eg. https://example.com/PluginName.dll or https://example.com/SearchPlugin.dll?token=abc123or https://example.com/QuestionPlugin?token=abc123.

Sources

Loosely based on the .NET Core plugin system described here