Search Results for

    Show / Hide Table of Contents

    Dependency Injection

    All Modules have DI support and activates through ActivatorUtilities with scoped service provider

    public class SampleModule: TelegramModule
    {
        private readonly TelegramModulesService _modulesService;
        private readonly SampleService _service;
    
        public SampleModule(TelegramModulesService modulesService, SampleService service)
        {
            _modulesService = modulesService;
            _service = service;
        }
     }
    
    • Improve this Doc
    ☀
    ☾
    In This Article
    Back to top
    TelegramModularFramework (c) 2022-2022
    ☀
    ☾