public async Task <IStandardInstance> HandleCreation(IStandardInstance instance) { IStandardInstance handledInstance = new JiraStandardIssue(); if (!instance.Identifiers.ContainsKey(InstanceKeyNames.JIRA_ISSUE)) { handledInstance = await _resourceService.CreateInstanceAsync(instance); await _resourcePublisher.PublishKeyMap(instance.Identifiers); } return(handledInstance); }
public async Task <IStandardInstance> HandleCreation(IStandardInstance instance) { IStandardInstance handledInstance = new StandardTopic(); if (!instance.Identifiers.ContainsKey(InstanceKeyNames.EASY_ACCESS_TOPIC)) { Debug.WriteLine("Creating new Topic from instance from: " + instance.MessageOrigin); handledInstance = await _resourceService.CreateInstanceAsync(instance); await _resourcePublisher.PublishKeyMap(instance.Identifiers); } return(handledInstance); }