public BaseRestService(IRestHandler restHandler, IFormat formator, IRestRequest restRequest) { _restHandler = restHandler; _formator = formator; _restRequest = restRequest; Initialize(); }
public override string InitIO(string port) { _iniSettings = new IniSettings(HS); //_iniSettings.IniSettingsChangedForCheckInterval += IniSettingsChangedForCheckInterval; _iniSettings.IniSettingsChangedForUserNamePassword += IniSettingsChangedForUserNamePassword;; _log = new Log(HS, _iniSettings); _log.Info("Starting plugin"); _config = new ConfigHandler(HS, Callback, _iniSettings, _log); _config.Register(); _deviceHandler = new DeviceHandler(HS, _log); _settings = new Setting(HS); _settings.DoIniFileTemplateIfFileMissing(); _restHandler = new RestHandler(_log); StartLoginAndDataFetchingInNewThread(); Shutdown = false; _log.Debug("Done init io"); return(""); }
/// <summary> /// Initializes a new instance of the <see cref="EntitlementService"/> class. /// </summary> /// <param name="serviceContext"></param> public EntitlementService(ServiceContext serviceContext) { ServiceContextValidation(serviceContext); this.serviceContext = serviceContext; restHandler = new SyncRestHandler(this.serviceContext); // Set the Service type to QBO by calling a method. this.serviceContext.UseDataServices(); }
/// <summary> /// Initializes a new instance of the <see cref="Batch"/> class. /// </summary> /// <param name="serviceContext">The service context.</param> /// <param name="restHandler">The rest handler.</param> internal RecurringTransactions(ServiceContext serviceContext, IRestHandler restHandler) { this.serviceContext = serviceContext; this.restHandler = restHandler; this.responseSerializer = CoreHelper.GetSerializer(this.serviceContext, false); this.recurringTxnRequests = new List <RecurringTransaction>(); this.batchResponses = new List <BatchItemResponse>(); this.intuitBatchItemResponses = new List <IntuitBatchResponse>(); }
/// <summary> /// GlobalTaxService class /// </summary> /// <param name="serviceContext">IPP Service Context</param> public GlobalTaxService(ServiceContext serviceContext) { ServiceContextValidation(serviceContext); this.serviceContext = serviceContext; this.restHandler = new SyncRestHandler(this.serviceContext); // Set the Service type to either QBO by calling a method. this.serviceContext.UseDataServices(); }
/// <summary> /// Initializes a new instance of the <see cref="Batch"/> class. /// </summary> /// <param name="serviceContext">The service context.</param> /// <param name="restHandler">The rest handler.</param> internal Batch(ServiceContext serviceContext, IRestHandler restHandler) { this.serviceContext = serviceContext; this.restHandler = restHandler; this.responseSerializer = CoreHelper.GetSerializer(this.serviceContext, false); this.batchRequests = new List <BatchItemRequest>(); this.batchResponses = new List <BatchItemResponse>(); this.intuitBatchItemResponses = new List <IntuitBatchResponse>(); }
// Actual Responder public ActionResult Index(string version, string modelname, string parameters) { string data = string.Empty; // Key Api Key First string key = Request.QueryString["key"]; ApiResponse <object> FailedKeyResponse = new ApiResponse <object>(); if (!AuthenticateKey(key, FailedKeyResponse)) { data = MerchantTribe.Web.Json.ObjectToJson(FailedKeyResponse); } else { // Create Handler IRestHandler handler = RestHandlerFactory.Instantiate(version, modelname, MTApp); // Read Posted JSON string postedString = string.Empty; Stream inputStream = Request.InputStream; if (inputStream != null) { StreamReader rdr = new StreamReader(inputStream); postedString = rdr.ReadToEnd(); } switch (Request.HttpMethod.ToUpperInvariant()) { case "GET": data = handler.GetAction(parameters, Request.QueryString); break; case "POST": data = handler.PostAction(parameters, Request.QueryString, postedString); break; case "PUT": data = handler.PutAction(parameters, Request.QueryString, postedString); break; case "DELETE": data = handler.DeleteAction(parameters, Request.QueryString, postedString); break; } } // Return Result (or text formatted result) if (Request.QueryString["apiformat"] == "text") { return(new RawResult(data, "text/html")); } return(new PreJsonResult(data)); }
/// <summary> /// Constructor /// </summary> /// <param name="membershipService"></param> /// <param name="eventService"></param> /// <param name="restHandler"></param> /// <param name="webhookRepository"></param> public WebhookService( IMembershipService membershipService, IEventService eventService, IRestHandler restHandler, IWebhookRepository webhookRepository) : base(membershipService, webhookRepository) { this.eventService = eventService; this.restHandler = restHandler; this.eventService.EventFired += EventServiceOnEventFired; this.OnCreated += this.WebhookCreatedEventHandler; this.OnUpdated += this.WebhookUpdatedEventHandler; this.OnDeleted += this.WebhookDeletedEventHandler; }
///// <summary> ///// Collection of Not expressions. ///// </summary> //[Obsolete("Deprecated. Use QueryService->ExecuteIdsQuery")] //private IEnumerable<LinqExtender.Ast.Expression> notExpressions; #endregion /// <summary> /// Initializes a new instance of the QueryService class. /// </summary> /// <param name="serviceContext">The ServiceContext class.</param> public QueryService(ServiceContext serviceContext) { this.serviceContext = serviceContext; // Set the Service type to either QBO by calling a method. this.serviceContext.UseDataServices(); this.restHandler = new SyncRestHandler(this.serviceContext); this.responseSerializer = CoreHelper.GetSerializer(this.serviceContext, false); this.queryBuilder = new StringBuilder(); this.selectBuilder = new StringBuilder(); this.countBuilder = new StringBuilder(); this.orderByBuilder = new StringBuilder(); this.whereBuilder = new StringBuilder(); this.fromBuilder = new StringBuilder(); this.pageBuilder = new StringBuilder(); //this.notExpressions = new List<LinqExtender.Ast.Expression>(); }
/// <summary> /// Constructor /// </summary> /// <param name="ertisAuthOptions"></param> /// <param name="restHandler"></param> public PasswordService(IErtisAuthOptions ertisAuthOptions, IRestHandler restHandler) : base(ertisAuthOptions, restHandler) { }
public static void Override(IRestHandler implementation) { (Current as RestHandler).Implementation = implementation; }
public BaseRestService(IRestHandler restHandler) { _restRequest = new RestRequest(); _restHandler = restHandler; Initialize(); }
/// <summary> /// Constructor /// </summary> /// <param name="restHandler"></param> /// <param name="ip2LocationOptions"></param> public GeoLocationService(IRestHandler restHandler, IIp2LocationOptions ip2LocationOptions) : base(restHandler) { this.ip2LocationOptions = ip2LocationOptions; }
public PingDefault(PingEnv env, IRestHandler handler) { this.env = env; this.handler = handler; }
public static string GetVerificationToken(this IRestHandler client) { return(client.GetCookies(new Uri(ChomikujBase.MainAddress))[3].Value); }
public void Setup() { this.restHandler = new SystemRestHandler(); }
/// <summary> /// Constructor /// </summary> /// <param name="ertisAuthOptions"></param> /// <param name="restHandler"></param> public WebhookService(IErtisAuthOptions ertisAuthOptions, IRestHandler restHandler) : base(ertisAuthOptions, restHandler) { }
private RestHandler() { this.Implementation = new SystemRestHandler(); }
/// <summary> /// Constructor /// </summary> /// <param name="ertisAuthOptions"></param> /// <param name="restHandler"></param> public ProviderService(IErtisAuthOptions ertisAuthOptions, IRestHandler restHandler) : base(ertisAuthOptions, restHandler) { }
/// <summary> /// Constructor /// </summary> /// <param name="ertisAuthOptions"></param> /// <param name="restHandler"></param> public MembershipService(IErtisAuthOptions ertisAuthOptions, IRestHandler restHandler) : base(restHandler) { this.AuthApiBaseUrl = ertisAuthOptions.BaseUrl; }
public FactRepository(IRestHandler restHandler, string queueName) { RestHandler = restHandler; QueueName = queueName; }
/// <summary> /// Constructor /// </summary> /// <param name="ertisAuthOptions"></param> /// <param name="restHandler"></param> protected MembershipBoundedService(IErtisAuthOptions ertisAuthOptions, IRestHandler restHandler) : base(restHandler) { this.BaseUrl = ertisAuthOptions.BaseUrl; this.MembershipId = ertisAuthOptions.MembershipId; }
/// <summary> /// Constructor /// </summary> /// <param name="ertisAuthOptions"></param> /// <param name="restHandler"></param> public ActiveTokensService(IErtisAuthOptions ertisAuthOptions, IRestHandler restHandler) : base(ertisAuthOptions, restHandler) { }
public RestRequest(IRestHandler handler) { Handler = handler; }
/// <summary> /// Constructor /// </summary> /// <param name="ertisAuthOptions"></param> /// <param name="restHandler"></param> protected ReadonlyMembershipBoundedService(IErtisAuthOptions ertisAuthOptions, IRestHandler restHandler) : base(ertisAuthOptions, restHandler) { }
/// <summary> /// Constructor /// </summary> /// <param name="ertisAuthOptions"></param> /// <param name="restHandler"></param> public RoleService(IErtisAuthOptions ertisAuthOptions, IRestHandler restHandler) : base(ertisAuthOptions, restHandler) { }
/// <summary> /// Constructor /// </summary> /// <param name="restHandler"></param> protected BaseRestService(IRestHandler restHandler) { this.restHandler = restHandler; }
/// <summary> /// Constructor /// </summary> /// <param name="ertisAuthOptions"></param> /// <param name="restHandler"></param> public ApplicationService(IErtisAuthOptions ertisAuthOptions, IRestHandler restHandler) : base(ertisAuthOptions, restHandler) { }