예제 #1
0
        /// <summary>
        /// Constructor which takes account id and application name.
        /// </summary>
        /// <param name="applicationName">The name of the client application</param>
        /// <param name="accountId">The account ID of the user.</param>
        /// using this service.</param>
        public ContentForShoppingService(String applicationName, String accountId)
            : base(GContentForShoppingService, applicationName)
        {
            _accountId = accountId;

            NewFeed += new ServiceEventHandler(OnNewFeed);
        }
 private void InvokeServiceEvent(ServiceEventHandler handler, ServiceEventArgs evt)
 {
     if (handler != null)
     {
         handler(this, evt);
     }
 }
예제 #3
0
 internal static void OnServiceChanged(ServiceEventArgs e)
 {
     if (events[servicekey] != null)
     {
         ServiceEventHandler handler = events[servicekey] as ServiceEventHandler;
         handler(null, e);
     }
 }
예제 #4
0
        protected virtual void OnFailure(object sender, ServiceEventArgs eventArgs)
        {
            ServiceEventHandler handler = OnServiceFailure;

            if (OnServiceFailure != null)
            {
                handler(sender, eventArgs);
            }
        }
예제 #5
0
 internal static void OnServiceChanged(ServiceEventArgs e)
 {
     if (Events[Servicekey] != null)
     {
         ServiceEventHandler handler = Events[Servicekey] as ServiceEventHandler;
         if (handler != null)
         {
             handler(null, e);
         }
     }
 }
예제 #6
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();
            }
        }
예제 #7
0
 public FinanceService(string applicationName) : base(ServiceName, applicationName)
 {
     NewFeed += new ServiceEventHandler(FinanceService_NewFeed);
 }
예제 #8
0
 public FinanceService(string applicationName) : base(ServiceName, applicationName)
 {
     NewFeed += new ServiceEventHandler(FinanceService_NewFeed);
 }
예제 #9
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="applicationName">The name of the client application</param>
 /// using this service.</param>
 public ContentForShoppingService(String applicationName)
     : base(GContentForShoppingService, applicationName)
 {
     NewFeed += new ServiceEventHandler(OnNewFeed);
 }