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
<app> | |
<div class="container-fluid"> | |
<div class="row"> | |
<div class="col-2"></div> | |
<div class="col-8"> | |
<p></p> | |
Loading Blazor WebAssembly... | |
<br /> | |
<div class="progress"> | |
<div id="progressbar" class="progress-bar progress-bar-striped active" role="progressbar" style="width:0"></div> |
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 WebAssemblyResourceLoader { | |
// ... | |
loadResources(resources: ResourceList, url: (name: string) => string, resourceType: WebAssemblyBootResourceType): LoadingResource[] { | |
return Object.keys(resources) | |
.map(name => this.loadResource(name, url(name), resources[name], resourceType)); | |
} | |
loadResource(name: string, url: string, contentHash: string, resourceType: WebAssemblyBootResourceType): LoadingResource { | |
const response = this.cacheIfUsed |
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 System.Collections.Generic; | |
using System.Linq.Expressions; | |
using System.Runtime.CompilerServices; | |
using System.Threading.Tasks; | |
using AngleSharpWrappers; | |
using Bunit; | |
using Microsoft.AspNetCore.Components; | |
namespace ConsoleAppBUnit |
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
[FunctionName("QuerySmartContractFunction")] | |
public async Task<IActionResult> RunQueryFunctionAsync( | |
[HttpTrigger(AuthorizationLevel.Function, "post")]HttpRequest req) | |
{ | |
_logger.LogInformation("RunDeployContract"); | |
string body = await req.ReadAsStringAsync(); | |
var request = JsonConvert.DeserializeObject<SmartContractDeployRequest>(body); | |
try |
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
[FunctionName("QuerySmartContractFunction")] | |
public static async Task<IActionResult> RunQueryFunctionAsync( | |
[HttpTrigger(AuthorizationLevel.Function, "post")]HttpRequest req, | |
[Inject] ISmartContractService service, | |
ILogger logger) | |
{ | |
_logger.LogInformation("QuerySmartContractFunction"); | |
string body = await req.ReadAsStringAsync(); | |
var request = JsonConvert.DeserializeObject<SmartContractFunctionRequest>(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
[FunctionName("ExecuteSmartContractFunction")] | |
public async Task<IActionResult> RunExecuteFunctionAsync( | |
[HttpTrigger(AuthorizationLevel.Function, "post")]HttpRequest req) | |
{ | |
_logger.LogInformation("ExecuteSmartContractFunction"); | |
string body = await req.ReadAsStringAsync(); | |
var request = JsonConvert.DeserializeObject<SmartContractFunctionRequest>(body); | |
try |
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
import javax.crypto.Mac; | |
import javax.crypto.spec.SecretKeySpec; | |
import java.security.InvalidKeyException; | |
def hmac_sha256(String secretKey, String data) { | |
def mac = Mac.getInstance("HmacSHA256"); | |
def secretKeySpec = new SecretKeySpec(secretKey.getBytes(), "HmacSHA256"); | |
mac.init(secretKeySpec); | |
return mac.doFinal(data.getBytes()); |
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.Extensions.Options; | |
using System; | |
using System.Configuration; | |
using System.Linq; | |
using System.Reflection; | |
namespace ConsoleApp | |
{ | |
public static class OptionsBuilderExtensions | |
{ |
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
# Build source, tests and run tests with coverage | |
- script: | | |
dotnet test ./test/MyTestProject.csproj -c Debug --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=opencover | |
displayName: 'Build source, tests and run tests with coverage' | |
# Upload coverage to codecov.io | |
- script: | | |
%USERPROFILE%\.nuget\packages\codecov\1.1.0\tools\codecov.exe -f "./test/MyTestProject/coverage.opencover.xml" -t $(CODECOV_TOKEN) | |
displayName: Upload coverage to codecov.io |
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
<ItemGroup> | |
<PackageReference Include="Codecov" Version="1.1.0" /> | |
<!-- more pacakges here ... --> | |
</ItemGroup> |