Exemple #1
0
        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());
        }
Exemple #2
0
 public bool TryGetMessageHandler(RP_Shared_Script.ScriptMessages message, out IScriptMessageHandler handler)
 {
     return(_Handlers.TryGetValue(message, out handler));
 }