public static void Main(string[] args) { IHost host = CreateHostBuilder(args).Build(); IMessageQueue messageQueue = host .Services .GetRequiredService <IMessageQueue>(); messageQueue.Connect(); ICommandsHelper commandsHelper = host .Services .GetRequiredService <ICommandsHelper>(); commandsHelper.AddCommand("stock"); var userManager = host .Services .GetRequiredService <UserManager <ChatUser> >(); var logger = host .Services .GetRequiredService <ILogger <DatabaseInitialization> >(); var chatRoomService = host .Services .GetRequiredService <IChatRoomService>(); DatabaseInitialization.Initialize(userManager, logger, chatRoomService); host.Run(); }
public MessageParser(ICommandsHelper commandsHelper) { _commandsHelper = commandsHelper; }