public ChatHubUserMessage( string text, DateTime sentAt, IChatHubHistory history, Func <IServiceProvider> serviceProviderFactory) : base(text, sentAt, history) { var provider = serviceProviderFactory(); _chatSession = provider.GetRequiredService <IChatSession>(); }
public ChatHubAdministratorMessage( string text, DateTime sentAt, IChatHubHistory history, Func <IServiceProvider> serviceProviderFactory) : base(text, sentAt, history) { var provider = serviceProviderFactory(); _hubContext = provider.GetRequiredService <IHubContext <ChatHub> >(); _userChatHubSession = provider.GetRequiredService <IUserChatHubSession>(); _uowFactory = provider.GetRequiredService <Func <UnitOfWork> >(); }