This file contains 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
public class ApiKeyRequirement : IAuthorizationRequirement | |
{ | |
public IReadOnlyList<string> ApiKeys { get; set; } | |
public ApiKeyRequirement(IEnumerable<string> apiKeys) | |
{ | |
ApiKeys = apiKeys?.ToList() ?? new List<string>(); | |
} | |
} |
This file contains 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
services.AddMvc() | |
// This allows to exclude some assembly from controller discovery | |
.ConfigureApplicationPartManager(a => | |
{ | |
var appPart = a.ApplicationParts.FirstOrDefault(ap => ap.Name == "Assembly.Name"); | |
if (appPart != null) | |
{ | |
a.ApplicationParts.Remove(appPart); | |
} | |
}) |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<system.webServer> | |
<!-- The compression should be turned off to be able to inject content via a rewrite url --> | |
<!-- CloudFlare will still compress the final response when sending to the client --> | |
<urlCompression doStaticCompression="false" doDynamicCompression="false"/> | |
</system.webServer> | |
</configuration |
This file contains 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
public class Container | |
{ | |
public Animal Animal { get; set; } | |
} | |
[JsonConverter(typeof(JsonInheritanceConverter), "discriminator")] | |
[KnownType(typeof(Dog))] | |
public class Animal | |
{ | |
public string Foo { get; set; } |
This file contains 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
namespace Project.SpaExtensions | |
{ | |
public interface IUserLanguageService | |
{ | |
string GetUserLocale(); | |
} | |
} |
This file contains 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 LightQuery; | |
public class ApiController : Controller | |
{ | |
[LightQuery(forcePagination: true, defaultPageSize: 3)] | |
[ProducesResponseType(typeof(PaginationResult<User>), 200)] | |
public IActionResult GetValues() | |
{ | |
var values = _repository.GetAllValuesAsQueryable(); | |
return Ok(values); |
This file contains 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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>netcoreapp2.0</TargetFramework> | |
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | |
<RootNamespace></RootNamespace> | |
<IsPackable>False</IsPackable> | |
<NoWarn>CS0649;CS0169</NoWarn> | |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<packageSources> | |
<add key="localPackages" value="./LocalPackages" /> | |
</packageSources> | |
</configuration> |
This file contains 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 Dangl.AVA.Contents; | |
using Dangl.AVA.Contents.ServiceSpecificationContents; | |
namespace Dangl.AVA.Converter.Tests.Utilities.TutorialFiles | |
{ | |
public static class ProjectGenerator | |
{ | |
public static Project GetProject() | |
{ | |
var project = new Project(); |
This file contains 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
#begin[GAEB] | |
#begin[_Dangl] | |
[_Info]Created with Dangl GAEB Tool, Copyright 2013 - 2018 Georg Dangl, www.dangl-it.com, Version 1.4.15.0 (Built: 11.01.2018 16:13)[end] | |
#end[_Dangl] | |
#begin[GAEBInfo] | |
[Version]1.2[end] | |
[VersMon]11[end] | |
[VersJahr]2001[end] | |
[Datum]17.02.2018[end] | |
[Uhrzeit]11:07[end] |