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]$deployUsername, | |
[string]$deployPassword | |
) | |
$VisualStudioVersion = "15.0" # 15 == VS 2017 | |
$msDeployPath = "C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\msdeploy.exe" | |
$MsBuildPath = $(Get-ItemProperty "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7").$VisualStudioVersion + "MSBuild\15.0\Bin\MSBuild.exe" | |
$sourcePath = "'$PSScriptRoot/src/<ProjectFolder>/bin/Release/net461'" |
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.AddIdentity<AppUser, AppRole>(); | |
services.AddAuthentication() | |
.AddIdentityServerAuthentication(o => | |
{ | |
o.RequireHttpsMetadata = !environment.IsDevelopment(); | |
o.ApiName = "api"; | |
o.Authority = configuration["IdentityServer:Authority"]; | |
}); |
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
$docsFolder = "$PSScriptRoot/generated_docs" | |
Get-ChildItem -Path "$docsFolder" -Filter "*.html" -Recurse | | |
Foreach-Object { | |
(Get-Content $_.FullName).replace("blob/$env:GIT_BRANCH", "blob/$env:GIT_COMMIT") | Set-Content $_.FullName | |
} |
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 IntegrationTestsHttpMessageHandler : HttpMessageHandler | |
{ | |
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) | |
{ | |
var handler = TestServer.CreateHandler(); | |
return handler.SendAsync(request, cancellationToken); | |
} | |
} |
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
C:\Solution\test\Project.Tests>dotnet xunit | |
Detecting target frameworks in Project.Tests.csproj... | |
Building for framework netcoreapp2.0... | |
Dangl.AVA -> C:\Solution\src\Project\bin\Debug\netstandard1.3\Project.dll | |
Dangl.AVA.Tests -> C:\Solution\test\Project.Tests\bin\Debug\netcoreapp2.0\Project.Tests.dll | |
Running .NET Core 2.0 tests for framework netcoreapp2.0... | |
The specified framework version '2.0' could not be parsed | |
The specified framework 'Microsoft.NETCore.App', version '2.0' was not found. | |
- Check application dependencies and target a framework version installed at: | |
\ |
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
export class MainComponent { | |
onEditorClosed(hasChanged: boolean) { | |
if (hasChanged) { | |
this.dataService.forceRefresh(); | |
this.dataService.paginationResult | |
.skip(1) // Discard the current value from the ReplaySubject | |
.take(1) // To release the subscription again | |
.subscribe(() => this.dataService.getDataById(this.data.id) | |
.then(data => { |
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 AccountController : Controller | |
{ | |
[HttpPost("login")] | |
[AllowAnonymous] | |
[ProducesResponseType(204)] | |
[ProducesResponseType(400)] | |
public async Task<IActionResult> Login([FromBody] LoginPost model) | |
{ | |
var user = await _userManager.FindByEmailAsync(model.Identifier) | |
?? await _userManager.FindByNameAsync(model.Identifier); |
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 Microsoft.Web.Deployment; | |
using System; | |
using System.IO; | |
namespace Nuke.Common.Tools.WebDeploy | |
{ | |
public class AppOfflineWrapper : IDisposable | |
{ | |
private readonly WebDeploySettings _settings; | |
private string _tempAppOfflinePath; |
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
class Build : NukeBuild | |
{ | |
[Parameter] readonly string Environment; | |
[Parameter] readonly string WebDeployUsername; | |
[Parameter] readonly string WebDeployPassword; | |
[Parameter] readonly string WebDeployPublishUrl; | |
[Parameter] readonly string WebDeploySiteName; | |
Target Publish => _ => _ | |
.Requires(() => Environment) |
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 InMemoreCompilation | |
{ | |
public static class CodeGenerator | |
{ | |
public static string GenerateCalculator() | |
{ | |
var calculator = @"namespace Calculator | |
{ | |
public class Calculator | |
{ |