-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
80fdd09
commit 5387e94
Showing
5 changed files
with
123 additions
and
14 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
/* | ||
* COPYRIGHT: See COPYING in the top level directory | ||
* PROJECT: Plugin | ||
* FILE: Plugin/IAsyncPlugin.cs | ||
* PURPOSE: Basic Plugin Support, in this case async | ||
* PROGRAMER: Peter Geinitz (Wayfarer) | ||
* SOURCES: https://docs.microsoft.com/en-us/dotnet/core/tutorials/creating-app-with-plugin-support | ||
*/ | ||
|
||
// ReSharper disable UnusedParameter.Global, future proofing, it is up to the person how to use this ids | ||
// ReSharper disable UnusedMember.Global | ||
|
||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
|
||
namespace Plugin | ||
{ | ||
/// <summary> | ||
/// Async version of the Plugin Interface | ||
/// </summary> | ||
public interface IAsyncPlugin | ||
{ | ||
/// <summary> | ||
/// Gets the name. | ||
/// </summary> | ||
/// <value> | ||
/// The name. | ||
/// </value> | ||
string Name { get; } | ||
|
||
/// <summary> | ||
/// Gets the type. | ||
/// </summary> | ||
/// <value> | ||
/// The type. | ||
/// </value> | ||
string Type { get; } | ||
|
||
/// <summary> | ||
/// Gets the description. | ||
/// </summary> | ||
/// <value> | ||
/// The description. | ||
/// </value> | ||
string Description { get; } | ||
|
||
/// <summary> | ||
/// Gets the version. | ||
/// </summary> | ||
/// <value> | ||
/// The version. | ||
/// </value> | ||
Version Version { get; } | ||
|
||
/// <summary> | ||
/// Gets the commands. | ||
/// </summary> | ||
/// <value> | ||
/// The commands. | ||
/// </value> | ||
List<Command> Commands { get; } | ||
|
||
/// <summary> | ||
/// Executes the asynchronous. | ||
/// </summary> | ||
/// <returns>Status Code asnc</returns> | ||
Task<int> ExecuteAsync(); | ||
|
||
/// <summary> | ||
/// Executes the command asynchronous. | ||
/// </summary> | ||
/// <param name="id">The identifier.</param> | ||
/// <returns>Result object, async.</returns> | ||
Task<object> ExecuteCommandAsync(int id); | ||
|
||
/// <summary> | ||
/// Gets the plugin type asynchronous. | ||
/// </summary> | ||
/// <param name="id">The identifier.</param> | ||
/// <returns>Status Code asnc</returns> | ||
Task<int> GetPluginTypeAsync(int id); | ||
|
||
/// <summary> | ||
/// Gets the information. | ||
/// </summary> | ||
/// <returns> | ||
/// Info about the plugin | ||
/// </returns> | ||
string GetInfo(); | ||
|
||
/// <summary> | ||
/// Closes asynchronous. | ||
/// </summary> | ||
/// <returns>Status Code</returns> | ||
Task<int> CloseAsync(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters