Exemple #1
0
 /// <summary>
 /// Executes any necessary start up code for the hub.
 ///
 /// Exceptions:
 ///     ArgumentNullException: When any parameter is null.
 /// </summary>
 public ChatHub(
     ILogger <ChatHub> logger,
     IUserService userService,
     IServerService serverService,
     IPrivateGroupMessagingService privateGroupMessagingService,
     IChannelsService channelsService,
     IDirectMessagingService directMessagingService
     )
 {
     _logger        = logger ?? throw new ArgumentNullException(nameof(logger));
     _userService   = userService ?? throw new ArgumentNullException(nameof(userService));
     _serverService = serverService ?? throw new ArgumentNullException(nameof(serverService));
     _privateGroupMessagingService = privateGroupMessagingService ?? throw new ArgumentNullException(nameof(privateGroupMessagingService));
     _channelsService        = channelsService ?? throw new ArgumentNullException(nameof(channelsService));
     _directMessagingService = directMessagingService ?? throw new ArgumentNullException(nameof(directMessagingService));
 }
Exemple #2
0
 /// <summary>
 /// Creates a new instance of DirectMessagingController.
 ///
 /// Exceptions:
 ///     ArgumentNullException: When any parameter is null.
 /// </summary>
 public DirectMessagingController(IDirectMessagingService directMessagingService)
 {
     _directMessagingService = directMessagingService
                               ?? throw new ArgumentNullException(nameof(directMessagingService));
 }