2017-05-31 01:31:56 -04:00
|
|
|
|
using System;
|
|
|
|
|
|
2018-04-08 02:44:42 -04:00
|
|
|
|
namespace SharedLibraryCore.Helpers
|
2017-05-31 01:31:56 -04:00
|
|
|
|
{
|
|
|
|
|
public class MessageToken
|
|
|
|
|
{
|
|
|
|
|
public string Name { get; private set; }
|
2018-05-05 16:36:26 -04:00
|
|
|
|
Func<Server, string> Value;
|
|
|
|
|
public MessageToken(string Name, Func<Server, string> Value)
|
2017-05-31 01:31:56 -04:00
|
|
|
|
{
|
|
|
|
|
this.Name = Name;
|
|
|
|
|
this.Value = Value;
|
|
|
|
|
}
|
2018-05-05 16:36:26 -04:00
|
|
|
|
|
|
|
|
|
public string Process(Server server)
|
2017-05-31 01:31:56 -04:00
|
|
|
|
{
|
2018-05-05 16:36:26 -04:00
|
|
|
|
return this.Value(server);
|
2017-05-31 01:31:56 -04:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|