This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
builder.Services.AddOpenApi(options => { | |
options.AddOperationTransformer<AddHeaderParametersTransformer>(); | |
});//Default document name is v1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.OpenApi; | |
using Microsoft.OpenApi.Models; | |
namespace Example.Api | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.OpenApi.Models; | |
using Swashbuckle.AspNetCore.SwaggerGen; | |
namespace Example.Api | |
{ | |
public class AddHeaderParameters : IOperationFilter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Scalar.AspNetCore; | |
using Microsoft.OpenApi.Models; | |
var builder = WebApplication.CreateBuilder(args); | |
//Adds a default v1.json document | |
builder.Services.AddOpenApi(); | |
var app = builder.Build(); | |
app.MapOpenApi(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
steps: | |
- task: VSTest@2 | |
displayName: 'VsTest - testAssemblies' | |
inputs: | |
testAssemblyVer2: | | |
**\*tests.dll | |
!**\*TestAdapter.dll | |
!**\obj\** | |
!**\bin\**\ref\** | |
codeCoverageEnabled: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var builder = WebApplication.CreateBuilder(args); | |
builder.Services.AddRazorPages(); | |
builder.Services.AddControllersWithViews(); | |
var app = builder.Build(); | |
if (!app.Environment.IsDevelopment()) | |
{ | |
app.UseExceptionHandler("/Error"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var builder = WebApplication.CreateBuilder(args); | |
builder.Services.AddRazorPages(); | |
builder.Services.AddControllersWithViews(); | |
var app = builder.Build(); | |
if (!app.Environment.IsDevelopment()) | |
{ | |
app.UseExceptionHandler("/Error"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<system.applicationHost> | |
<applicationPools> | |
<add name="YourAppPool"> | |
<recycling> | |
<periodicRestart memory="1048576" /> <!-- Recycle at 1GB --> | |
</recycling> | |
</add> | |
</applicationPools> | |
</system.applicationHost> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<system.web> | |
<httpRuntime maxRequestLength="4096" executionTimeout="20" /> | |
</system.web> | |
<system.webServer> | |
<security> | |
<requestFiltering> | |
<requestLimits maxAllowedContentLength="4194304" /> | |
</requestFiltering> | |
</security> | |
</system.webServer> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.SemanticKernel; | |
using System.ComponentModel; | |
namespace EmailRewriter.Web | |
{ | |
public class EmailReadabilityPlugin | |
{ | |
[KernelFunction] | |
[Description("Calculates the readability of an email.")] | |
[return: Description("A calculated number representing the readability of an email.")] |