Ejemplo n.º 1
0
        private static void OnWebRequestFailure(object sender, GameEventArgs e)
        {
            WebRequestFailureEventArgs args            = (WebRequestFailureEventArgs)e;
            WebRequestEvent            webRequestEvent = args.UserData as WebRequestEvent;

            if (webRequestEvent == null)
            {
                return;
            }

            if (webRequestEvent.OnFailure != null)
            {
                webRequestEvent.OnFailure(args.SerialId, args.ErrorMessage);
            }
        }
Ejemplo n.º 2
0
        private static void OnWebRequestSuccess(object sender, GameEventArgs e)
        {
            WebRequestSuccessEventArgs args = (WebRequestSuccessEventArgs)e;

            WebRequestEvent webRequestEvent = args.UserData as WebRequestEvent;

            if (webRequestEvent == null)
            {
                return;
            }

            if (webRequestEvent.OnSuccess != null)
            {
                webRequestEvent.OnSuccess(args.SerialId, args.GetWebResponseBytes());
            }
        }
Ejemplo n.º 3
0
        private static void OnWebRequestStart(object sender, GameEventArgs e)
        {
            WebRequestStartEventArgs args = (WebRequestStartEventArgs)e;

            WebRequestEvent webRequestEvent = args.UserData as WebRequestEvent;

            if (webRequestEvent == null)
            {
                return;
            }


            if (webRequestEvent.OnStart != null)
            {
                webRequestEvent.OnStart(args.SerialId);
            }
        }