public static webModel.ModuleDescriptor ToWebModel(this moduleModel.ModuleDescriptor descriptor)
        {
            var retVal = new webModel.ModuleDescriptor();
            retVal.InjectFrom(descriptor);

            if (descriptor.Dependencies != null)
            {
                retVal.Dependencies = descriptor.Dependencies.Select(d => d.ToWebModel()).ToList();
            }

            return retVal;
        }
        public static webModel.ModuleDescriptor ToWebModel(this moduleModel.ModuleDescriptor descriptor)
        {
            var retVal = new webModel.ModuleDescriptor();

            retVal.InjectFrom(descriptor);

            if (descriptor.Dependencies != null)
            {
                retVal.Dependencies = descriptor.Dependencies.Select(d => d.ToWebModel()).ToList();
            }

            return(retVal);
        }
Beispiel #3
0
        private webModel.ModuleWorkerJob SheduleJob(webModel.ModuleDescriptor descriptor, webModel.ModuleAction action)
        {
            var retVal = new webModel.ModuleWorkerJob(_packageService, descriptor, action);

            _sheduledJobs.Enqueue(retVal);

            if (_runningTask == null || _runningTask.IsCompleted)
            {
                lock (_lockObject)
                {
                    if (_runningTask == null || _runningTask.IsCompleted)
                    {
                        _runningTask = Task.Run(() => { DoWork(); }, retVal.CancellationToken);
                    }
                }
            }

            return(retVal);
        }
Beispiel #4
0
        public static moduleModel.ModuleDescriptor ToModuleModel(this webModel.ModuleDescriptor descriptor)
        {
            var retVal = new moduleModel.ModuleDescriptor();

            return(retVal);
        }