예제 #1
0
        public MountPoints(DockerContainer container) : base("_Mountpoint", new MountPointInstantiator())
        {
            this.container = container;
            this.device    = container.Device;

            api = TorizonAPIManager.GetDevicesApi();
        }
예제 #2
0
        public MemInfo(DockerContainer container)
        {
            this.container = container;
            this.device    = container.Device;

            api = TorizonAPIManager.GetDevicesApi();
        }
예제 #3
0
파일: Process.cs 프로젝트: toradex/moses
        public Processes(DockerContainer container) : base("Pid", new ProcessInstantiator())
        {
            this.container = container;
            this.device    = container.Device;

            api = TorizonAPIManager.GetDevicesApi();
        }
예제 #4
0
        public async Task <DockerContainer> GetContainerAsync(string configuration, TargetDevice targetdevice, Action <DockerContainer> ContainerUpdated)
        {
            TorizonRestAPI.Model.DockerContainer model = Utils.ObjectOrException <TorizonRestAPI.Model.DockerContainer>(await api.ApplicationGetcontainerAsync(this.Id, configuration, targetdevice.Id));

            DockerContainer container = new DockerContainer(model, targetdevice);

            ContainerUpdated?.Invoke(container);
            return(container);
        }
예제 #5
0
        public DockerContainer GetSDKContainer(string configuration)
        {
            TorizonRestAPI.Model.DockerContainer model =
                Utils.ObjectOrException <TorizonRestAPI.Model.DockerContainer>(
                    api.ApplicationSdkContainer(this.Id, configuration)
                    );

            DockerContainer container = new DockerContainer(model, null);

            return(container);
        }
예제 #6
0
        public async Task <DockerContainer> RunAsync(string configuration, TargetDevice targetdevice, Action <string, int> runningAction, Action <DockerContainer> ApplicationStarted)
        {
            Progress        progress  = null;
            DockerContainer container = null;

            var taskBuild = CreateProgressTask(ref progress, runningAction);

            _ = api.ApplicationRunAsync(this.Id, configuration, targetdevice.Id, progress?.Id).ContinueWith(task => {
                TorizonRestAPI.Model.DockerContainer model =
                    Utils.ObjectOrException <TorizonRestAPI.Model.DockerContainer>(task.Result);

                container = new DockerContainer(model, targetdevice);
                ApplicationStarted?.Invoke(container);
            });

            await Task.Run(taskBuild);

            return(container);
        }