baseline: OpenMU upstream b5a0961 (fresh source)
This commit is contained in:
40
tests/MUnique.OpenMU.PlugIns.Tests/ExampleStrategyPlugIn.cs
Normal file
40
tests/MUnique.OpenMU.PlugIns.Tests/ExampleStrategyPlugIn.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
// <copyright file="ExampleStrategyPlugIn.cs" company="MUnique">
|
||||
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
|
||||
// </copyright>
|
||||
|
||||
namespace MUnique.OpenMU.PlugIns.Tests;
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
/// <summary>
|
||||
/// A test strategy plugin.
|
||||
/// </summary>
|
||||
/// <seealso cref="MUnique.OpenMU.PlugIns.Tests.IExampleStrategyPlugIn" />
|
||||
[Guid("69A6FCD1-E828-4841-BE91-E064231ED7B9")]
|
||||
[PlugIn]
|
||||
[Display(Name = nameof(ExampleStrategyPlugIn), Description = "A test strategy plugin.")]
|
||||
public class ExampleStrategyPlugIn : IExampleStrategyPlugIn
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the command key which is handled by this strategy plugin type.
|
||||
/// </summary>
|
||||
public static string CommandKey => "/mytest";
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Key => CommandKey;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the handled command.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The handled command.
|
||||
/// </value>
|
||||
public string? HandledCommand { get; private set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public void HandleCommand(string command)
|
||||
{
|
||||
this.HandledCommand = command;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user