IW4M-Admin/SharedLibraryCore/Helpers/MessageToken.cs

25 lines
545 B
C#
Raw Normal View History

using System;
using System.Threading;
using System.Threading.Tasks;
2018-04-08 02:44:42 -04:00
namespace SharedLibraryCore.Helpers
{
public class MessageToken
{
public string Name { get; private set; }
private readonly Func<Server, Task<object>> _asyncValue;
public MessageToken(string Name, Func<Server, Task<object>> Value)
{
this.Name = Name;
_asyncValue = Value;
}
public Task<object> ProcessAsync(Server server)
{
return _asyncValue(server);
}
}
}