public static FxlClient GetClient(string host = "127.0.0.1", int port = 8080) { var client = new FxlApiV1.Client(new System.Net.Http.HttpClient()); client.BaseUrl = $"http://{host}:{port}/api/v1";; return(new FxlClient(client)); }
public Controller(FxlApiV1.Client client, FxlApiV1.Controller apiController) : base(client) { this.apiController = apiController; this.apiControllerInfo = new Lazy <FxlApiV1.ControllerInfo>(() => { try { var info = GetFromCache($"{apiController.Id}_Info", (x) => x, client.GetControllerInfoAsync(apiController.Id)).ConfigureAwait(false).GetAwaiter().GetResult(); return(info); } catch (Exception e) { Debug.WriteLine($"{e}"); } return(null); }); }
public Project(FxlApiV1.Client client, FxlApiV1.Project apiProject) : base(client) { this.apiProject = apiProject; }
/// <summary> /// Connect to OPEN FXL WebServer /// </summary> /// <param name="client"></param> public FxlClient(FxlApiV1.Client client) : base(client) { }
public BaseClient(FxlApiV1.Client client) { this.client = client; }