Beispiel #1
0
        public Task <bool> StopComponent(string name)
        {
            var runComp = ComponentsData.FirstOrDefault(c => c.Info.Name == name);

            if (runComp == null)
            {
                return(Task.FromResult(false));
            }

            var component = _runningComponents[runComp.Id];

            component.Dispose();
            runComp.Status = ComponentStatusEnum.Stopped;

            return(Task.FromResult(true));
        }