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