public AuthenticatedMessageHandlerDecorator(IScriptMessageHandler scriptMessageHandlerImplementation, AuthenticationService authenticationService, ILoggerFactory loggerFactory) { if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory)); } _ScriptMessageHandlerImplementation = scriptMessageHandlerImplementation ?? throw new ArgumentNullException(nameof(scriptMessageHandlerImplementation)); _AuthenticationService = authenticationService ?? throw new ArgumentNullException(nameof(authenticationService)); _Log = loggerFactory.GetLogger(GetType()); }
public bool TryGetMessageHandler(RP_Shared_Script.ScriptMessages message, out IScriptMessageHandler handler) { return(_Handlers.TryGetValue(message, out handler)); }