Skip to content

Instantly share code, notes, and snippets.

using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
namespace YourNamespace
{
public static class HttpRequestExtensions
{
public static bool CanReadBody(this HttpRequest request)
using System.Linq;
using System.Threading.Tasks;
using Microsoft.ApplicationInsights;
using Microsoft.AspNetCore.Mvc;
namespace YourNamespace
{
[ApiController]
[Route("[controller]")]
public class ExampleController : ControllerBase
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
namespace YourNamespace
{
using System.IO;
using System.Text;
using System.Threading.Tasks;
using Microsoft.ApplicationInsights;
using Microsoft.ApplicationInsights.DataContracts;
using Microsoft.AspNetCore.Mvc.Filters;
namespace YourNamespace
{
public class TrackConstants
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Nito.AsyncEx;
namespace YourProject
{
public interface IUpdateSequenceIdManager // you need to write your own implementation of this
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Formatting;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using Microsoft.TeamFoundation.SourceControl.WebApi;
using Newtonsoft.Json;
using System.Collections.Generic;
namespace YourProject
{
public class JiraDevInfoResponse
{
public Dictionary<string, JiraDevInfoResponseEntitySet> AcceptedDevInfoEntities { get; set; }
public Dictionary<string, JiraDevInfoResponseEntitySet> FailedDevInfoEntities { get; set; }
public List<string> UnknownIssueKeys { get; set; }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Atlassian.Jira;
namespace YourProject
{
public class JiraDevInfoBulkRequest
{
using System;
using Ucsb.Sa.Enterprise.AzDPullRequests.Web.Models.Atlassian;
namespace Ucsb.Sa.Enterprise.AzDPullRequests.Web.Models
{
public static class AtlassianConstants
{
public static string YourInstanceRootUrl = "https://your-domain.atlassian.net/";
public static string AtlassianApiRootUrl = "https://api.atlassian.com/";
using System;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
namespace YourProject
{
public interface IAtlassianOAuthenticator
{
HttpClient Client { get; }