示例#1
0
        private void AddInternal(Module module, String deploymentId)
        {
            var now  = DateTimeOffsetHelper.Now(_timeZone);
            var desc = new DeploymentInformation(
                deploymentId, module, now, now, new DeploymentInformationItem[0], DeploymentState.UNDEPLOYED);

            _deploymentStateService.AddUpdateDeployment(desc);
        }
示例#2
0
 public DeploymentResult Deploy(Module module, DeploymentOptions options)
 {
     using (_iLock.Acquire())
     {
         var deploymentId = _deploymentStateService.NextDeploymentId;
         return(DeployInternal(module, options, deploymentId, DateTimeOffsetHelper.Now(_timeZone)));
     }
 }
示例#3
0
        public DeploymentResult Deploy(Module module, DeploymentOptions options, String assignedDeploymentId)
        {
            using (_iLock.Acquire())
            {
                if (_deploymentStateService.GetDeployment(assignedDeploymentId) != null)
                {
                    throw new ArgumentException("Assigned deployment id '" + assignedDeploymentId +
                                                "' is already in use");
                }

                return(DeployInternal(module, options, assignedDeploymentId, DateTimeOffsetHelper.Now(_timeZone)));
            }
        }
示例#4
0
        private UndeploymentResult UndeployInternal(String deploymentId, UndeploymentOptions undeploymentOptions)
        {
            var info = _deploymentStateService.GetDeployment(deploymentId);

            if (info == null)
            {
                throw new DeploymentNotFoundException("Deployment by id '" + deploymentId + "' could not be found");
            }
            if (info.State == DeploymentState.UNDEPLOYED)
            {
                throw new DeploymentStateException("Deployment by id '" + deploymentId + "' is already in undeployed state");
            }

            var result  = UndeployRemoveInternal(info, undeploymentOptions);
            var updated = new DeploymentInformation(deploymentId, info.Module, info.AddedDate, DateTimeOffsetHelper.Now(_timeZone), new DeploymentInformationItem[0], DeploymentState.UNDEPLOYED);

            _deploymentStateService.AddUpdateDeployment(updated);
            return(result);
        }
 public ExprTimePeriodEvalDeltaConstDateTimeAdd(ExprTimePeriodImpl.TimePeriodAdder[] adders, int[] added, TimeZoneInfo timeZone)
 {
     _adders   = adders;
     _added    = added;
     _dateTime = new DateTimeEx(DateTimeOffsetHelper.Now(timeZone), timeZone);
 }
 public ExprTimePeriodEvalDeltaNonConstDateTimeAdd(TimeZoneInfo timeZone, ExprTimePeriodImpl parent)
 {
     _parent   = parent;
     _dateTime = new DateTimeEx(DateTimeOffsetHelper.Now(timeZone), timeZone);
 }
示例#7
0
 public ExprTimePeriodEvalDeltaNonConstDtxAdd(TimeZoneInfo timeZone, ExprTimePeriodImpl parent)
 {
     _parent            = parent;
     _dateTime          = new DateTimeEx(DateTimeOffsetHelper.Now(timeZone), timeZone);
     _indexMicroseconds = ExprTimePeriodUtil.FindIndexMicroseconds(parent.Adders);
 }