Skip to content

Instantly share code, notes, and snippets.

Derek Comartin dcomartin

Block or report user

Report or block dcomartin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Directory.Build.Props.xml
<Project>
<PropertyGroup>
<WarningsAsErrors>CS4014,VSTHRD103</WarningsAsErrors>
<NoWarn>VSTHRD200</NoWarn>
</PropertyGroup>
</Project>
View nowarn.xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
<WarningsAsErrors>CS4014,VSTHRD103</WarningsAsErrors>
<NoWarn>VSTHRD200</NoWarn>
</PropertyGroup>
</Project>
View csproj-WarningAsErrors2.xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
<WarningsAsErrors>CS4014,VSTHRD103</WarningsAsErrors>
</PropertyGroup>
</Project>
View csproj-WarningAsErrors.xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>latest</LangVersion>
<WarningsAsErrors>CS4014</WarningsAsErrors>
</PropertyGroup>
</Project>
View customer.cs
public class Customer
{
public string Name { get; set; }
public CustomerAddress Address { get;set; }
}
public class CustomerAddress
{
public string Address1 { get; set; }
public string Address2 { get; set; }
View customer.cs
public class Customer
{
public string Name { get; set; }
public string Address1 { get; set; }
public string Address2 { get; set; }
public string City { get; set; }
public string Country { get; set; }
}
View services.cs
public void ConfigureServices(IServiceCollection services)
{
services.AddQueue();
services.AddTransient<DemoInvocable>();
}
View queue.cs
using Coravel.Queuing.Interfaces;
using Microsoft.AspNetCore.Mvc;
using Microsoft.eShopWeb.Web.Features;
using Microsoft.eShopWeb.Web.ViewModels.Manage;
namespace Microsoft.eShopWeb.Web.Controllers
{
[Route("[controller]/[action]")]
public class DemoController : Controller
{
View invocable.cs
public class DemoInvocable : IInvocableWithPayload<string>, IInvocable
{
public string Payload { get; set; }
public async Task Invoke()
{
// Do Work Here
}
}
View services.cs
public void ConfigureServices(IServiceCollection services)
{
services.AddQueue();
}
You can’t perform that action at this time.