Exemplo n.º 1
0
        public static ServiceCall <DATA_TYPE> Create(ServiceRequest serviceRequest)
        {
            ServiceCall <DATA_TYPE> call = new ServiceCall <DATA_TYPE>();

            call.request = serviceRequest;
            return(call);
        }
Exemplo n.º 2
0
        public static void FetchData(ServiceEventHandler callback, object userData)
        {
            ServiceRequest request = new ServiceRequest()
            {
                _Type = MockAPIype, _ServiceCallContentType = ServiceCallContentType.Json, _EventDelegate = callback, _UserData = userData
            };
            RequestHelper requestHelper = new RequestHelper
            {
                Uri    = MockAPIUrl + "/demo/math/data",
                Params = new Dictionary <string, string>
                {
                },
                EnableDebug = true
            };

            request._requestHelper = requestHelper;

            ServiceCall <MockAPIData> call = ServiceCall <MockAPIData> .Create(request);

            if (call != null)
            {
                call.DoPost();
            }
        }