async public Task CreateDiscussionAsync(NewDiscussionParameters parameters) { try { await DiscussionOperator.CreateDiscussionAsync(MergeRequestDescriptor, parameters); } catch (OperatorException ex) { bool handled = await handleGitlabError(parameters, ex); throw new DiscussionCreatorException(handled); } }
async private Task <bool> createMergeRequestWithoutPosition(NewDiscussionParameters parameters) { Debug.Assert(parameters.Position.HasValue); Trace.TraceInformation("Reporting a discussion without Position (fallback)"); parameters.Body = getFallbackInfo(parameters.Position.Value) + "<br>" + parameters.Body; parameters.Position = null; try { await DiscussionOperator.CreateDiscussionAsync(MergeRequestDescriptor, parameters); } catch (OperatorException ex) { ExceptionHandlers.Handle(ex, "Cannot create a discussion (again)"); return(false); } return(true); }