IW4M-Admin/SharedLibraryCore/Helpers/MessageToken.cs
2022-01-26 15:26:25 -06:00

25 lines
553 B
C#

using System;
using System.Threading.Tasks;
namespace SharedLibraryCore.Helpers
{
public class MessageToken
{
private readonly Func<Server, Task<string>> _asyncValue;
public MessageToken(string Name, Func<Server, Task<string>> Value)
{
this.Name = Name;
_asyncValue = Value;
}
public string Name { get; }
public async Task<string> ProcessAsync(Server server)
{
var result = await _asyncValue(server);
return result;
}
}
}