예제 #1
0
        internal void InvokePreAuthenticationEvent(string userid, ref bool allow, ref string reason, ConnectionRequest request)
        {
            var ev = new PreAuthenticationEventArgs {
                Allow = allow, Request = request, UserId = userid, Reason = reason
            };

            PreAuthenticationEvent?.Invoke(ev);

            allow  = ev.Allow;
            reason = ev.Reason;
        }
예제 #2
0
        internal static void InvokePreAuthentication(string userId, ConnectionRequest request, ref bool allow)
        {
            var ev = new PreAuthenticationEvent
            {
                Allow   = allow,
                Request = request,
                UserId  = userId
            };

            PreAuthenticationEvent?.Invoke(ev);

            allow = ev.Allow;
        }