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 System; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.AspNetCore.Mvc.Filters; | |
namespace Filters | |
{ | |
public class ApiModelStateValidationFilter : IActionFilter | |
{ | |
public void OnActionExecuting(ActionExecutingContext context) | |
{ |
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
$xBimGeometryPackages = Join-Path -Path $env:USERPROFILE -ChildPath "\.nuget\packages\Xbim.Geometry" | |
$latestxBimGeometryPackage32 = Join-Path -Path ((Get-ChildItem -Path $xBimGeometryPackages | Sort-Object Fullname -Descending)[0].FullName) -ChildPath "build\x86\Xbim.Geometry.Engine32.dll" | |
$latestxBimGeometryPackage64 = Join-Path -Path ((Get-ChildItem -Path $xBimGeometryPackages | Sort-Object Fullname -Descending)[0].FullName) -ChildPath "build\x64\Xbim.Geometry.Engine64.dll" | |
if (!(Test-Path "$PSScriptRoot\Dependencies")){ | |
New-Item -ItemType Directory -Path "$PSScriptRoot\Dependencies" | |
} | |
Copy-Item -Path $latestxBimGeometryPackage32 -Destination "$PSScriptRoot\Dependencies\Xbim.Geometry.Engine32.dll" | |
Copy-Item -Path $latestxBimGeometryPackage64 -Destination "$PSScriptRoot\Dependencies\Xbim.Geometry.Engine64.dll" |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>NetCoreHeroes</title> | |
<link rel="icon" type="image/png" href="/favicon.png"> | |
<base href="@ViewData["AngularBase"]" /> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<body> |
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
param([string]$password) | |
$encrypted = ConvertTo-SecureString $password -AsPlainText -Force | |
ConvertFrom-SecureString $encrypted |
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
Param( | |
[string ]$ProjectDir | |
) | |
get-childitem $ProjectDir -recurse -include *.cs | | |
select -expand fullname | | |
foreach { | |
( Get-Content $_ ) -replace '\[TestMethod\]','[Fact]' ` | |
-replace 'Assert.AreEqual' , 'Assert.Equal' ` | |
-replace 'Assert.AreNotEqual' , 'Assert.NotEqual' ` | |
-replace 'Assert.IsTrue' , 'Assert.True' ` |
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 Startup | |
{ | |
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddIdentity<ApplicationUser>(identityConfig => | |
{ | |
identityConfig.User.AllowedUsernameCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._@+ "; | |
}); | |
} | |
} |
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"> | |
<ItemGroup> | |
<PackageReference Include="Antlr4.Runtime" Version="4.6.4" /> | |
<PackageReference Include="Antlr4.CodeGenerator" Version="4.6.5-beta001"> | |
<PrivateAssets>All</PrivateAssets> | |
</PackageReference> | |
</ItemGroup> | |
<ItemGroup> |
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> | |
<VersionPrefix>1.4.1</VersionPrefix> | |
<VersionSuffix Condition=" '$(GIT_BRANCH)' == 'origin/dev'">build-$(BUILD_NUMBER)</VersionSuffix> | |
<GeneratePackageOnBuild Condition="'$(Configuration)'=='Release'">True</GeneratePackageOnBuild> | |
<Authors>Georg Dangl</Authors> | |
<TargetFramework>netstandard1.3</TargetFramework> | |
<PackageId>Dangl.Common</PackageId> | |
<PackageProjectUrl>https://github.com/GeorgDangl/Dangl.Common</PackageProjectUrl> |
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> | |
<TargetFrameworks>netcoreapp2.0;netcoreapp1.1;netcoreapp1.0;net47;net461;net46</TargetFrameworks> | |
<AssemblyName>Dangl.Common.Tests</AssemblyName> | |
<PackageId>Dangl.Common.Tests</PackageId> | |
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> | |
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">1.1.1</RuntimeFrameworkVersion> | |
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion> | |
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute> |
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
Param( | |
[string]$globPattern = "results_*.testresults", | |
[string]$searchDirectory = $PSScriptRoot | |
) | |
# Find all files matching the glob pattern | |
$testResultFiles = Get-ChildItem -Path $searchDirectory -Filter $globPattern -Recurse | |
function getFrameworkNameFromFilename { | |
Param($file) |
OlderNewer