Exemple #1
0
        public static void InvokePreAuth(string userId, ConnectionRequest request, int position, byte flags, string country, ref bool allow)
        {
            if (PreAuthEvent == null)
            {
                return;
            }

            PreauthEvent ev = new PreauthEvent(userId, request, position, flags, country);

            PreAuthEvent.Invoke(ref ev);

            allow = ev.Allow;
        }
        public static void InvokePreAuth(string userId, ConnectionRequest request, int position, byte flags, string country, ref bool allow)
        {
            if (PreAuthEvent == null)
            {
                return;
            }

            PreauthEvent ev = new PreauthEvent(userId, request, position, flags, country);

            // ref should work optimally when using reflection
            PreAuthEvent.InvokeSafely(ev);

            allow = ev.Allow;
        }
Exemple #3
0
        public static void InvokePreAuth(ref string userId, ConnectionRequest request, ref bool allow)
        {
            if (PreAuthEvent == null)
            {
                return;
            }

            PreauthEvent ev = new PreauthEvent()
            {
                Allow   = allow,
                Request = request,
                UserId  = userId
            };

            PreAuthEvent.Invoke(ref ev);

            allow  = ev.Allow;
            userId = ev.UserId;
        }