Adding LambdaStartFormFactory

This commit is contained in:
FlorianDahn 2021-10-17 18:38:35 +02:00
parent e1d5051288
commit b001d5e9c4

View File

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Text;
using TelegramBotBase.Form;
namespace TelegramBotBase.Factories
{
public class LambdaStartFormFactory : Interfaces.IStartFormFactory
{
public delegate FormBase CreateFormDelegate();
private readonly CreateFormDelegate _lambda;
public LambdaStartFormFactory(CreateFormDelegate lambda)
{
_lambda = lambda;
}
public FormBase CreateForm()
{
return _lambda();
}
}
}