/// <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); } }
internal static void OnServiceChanged(ServiceEventArgs e) { if (events[servicekey] != null) { ServiceEventHandler handler = events[servicekey] as ServiceEventHandler; handler(null, e); } }
protected virtual void OnFailure(object sender, ServiceEventArgs eventArgs) { ServiceEventHandler handler = OnServiceFailure; if (OnServiceFailure != null) { handler(sender, eventArgs); } }
internal static void OnServiceChanged(ServiceEventArgs e) { if (Events[Servicekey] != null) { ServiceEventHandler handler = Events[Servicekey] as ServiceEventHandler; if (handler != null) { handler(null, e); } } }
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(); } }
public FinanceService(string applicationName) : base(ServiceName, applicationName) { NewFeed += new ServiceEventHandler(FinanceService_NewFeed); }
/// <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); }