TelegramBotFramework/TelegramBotBase/Factories/LambdaStartFormFactory.cs
2021-10-17 18:38:35 +02:00

25 lines
535 B
C#

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();
}
}
}