Example #1
0
        public override async Task <IDisplayResult> UpdateAsync(LocalizationPart model, IUpdateModel updater, UpdatePartEditorContext context)
        {
            var viewModel = new LocalizationPartViewModel();
            await updater.TryUpdateModelAsync(viewModel, Prefix, t => t.Culture);

            model.Culture = viewModel.Culture;
            // Need to do this here to support displaying the message to save before localizing when the item has not been saved yet.
            if (String.IsNullOrEmpty(model.LocalizationSet))
            {
                model.LocalizationSet = _iidGenerator.GenerateUniqueId();
            }
            return(Edit(model, context));
        }
        public async Task <IActionResult> Create(WorkflowServerEditModel model, CancellationToken cancellationToken)
        {
            var workflowServer = new WorkflowServer
            {
                WorkflowServerId = _idGenerator.GenerateUniqueId(),
                Name             = model.Name.Trim(),
                Url = model.Url
            };

            await _store.SaveAsync(workflowServer, cancellationToken);

            _notifier.Success(T["Remote workflow server has been created."]);
            return(RedirectToAction("Index"));
        }
 public string GenerateUniqueId()
 {
     return(_generator.GenerateUniqueId());
 }
Example #4
0
 public string GenerateUniqueId(Workflow workflow)
 {
     return(_idGenerator.GenerateUniqueId());
 }
 public string GenerateUniqueId() => _generator.GenerateUniqueId();
Example #6
0
 public string GenerateUniqueId(ActivityRecord activityRecord)
 {
     return(_idGenerator.GenerateUniqueId());
 }
 public void GenerateUniqueId(Condition condition)
 {
     condition.ConditionId = _idGenerator.GenerateUniqueId();
 }
 public string GenerateUniqueId(ContentItem contentItem)
 {
     return(_generator.GenerateUniqueId());
 }