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
public class DecoratorAttribute : Attribute | |
{ | |
} |
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
public interface IRepository | |
{ | |
} |
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
# ASP.NET Core (.NET Framework) | |
# Build and test ASP.NET Core projects targeting the full .NET Framework. | |
# Add steps that publish symbols, save build artifacts, and more: | |
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core | |
trigger: | |
branches: | |
include: | |
- master | |
paths: |
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
private async Task<IActionResult> ProcessResponse(Response response) | |
{ | |
var responseContent = await response.Body.ReadAsStringAsync(); | |
if (string.IsNullOrEmpty(responseContent) == false) | |
{ | |
return BadRequest(responseContent); | |
} | |
var header = response.Headers.FirstOrDefault(h => h.Key == "X-Message-Id"); |
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
public class SendGridConfig | |
{ | |
public string ApiKey { get; set; } | |
public string SenderEmail { get; set; } | |
public string SenderName { get; set; } | |
} |
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
private static async Task AddData() | |
{ | |
using (var db = new DataContext()) | |
{ | |
var project1 = new Project() | |
{ | |
Name = "project 1" | |
}; | |
await db.Projects.AddAsync(project1); |
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
static async Task ConsoleExample() | |
{ | |
var timeConstraint = TimeLimiter.GetFromMaxCountByInterval(5, TimeSpan.FromSeconds(1)); | |
for (int i = 0; i < 100; i++) | |
{ | |
await timeConstraint; | |
Console.WriteLine($"{DateTime.Now:MM/dd/yyy HH:mm:ss.fff}"); | |
} | |
} |
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
Feature: Auth - fetching jwt token | |
Background: | |
* url baseUrl+"/api/Auth/Login" | |
Scenario: Featch jwt token | |
Given request {"Username":"#(userName)","Password":"#(password)"} | |
When method POST | |
Then status 200 | |
And match response contains { "message": "Success" } |
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.Reflection | |
<Router AppAssembly="@typeof(Program).Assembly" | |
AdditionalAssemblies="@assemblies"> | |
<Found Context="routeData"> | |
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" /> | |
</Found> | |
<NotFound> | |
<LayoutView Layout="@typeof(MainLayout)"> | |
<p>Sorry, there's nothing at this address.</p> | |
</LayoutView> |
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
@page "/fetchdata" | |
@using BlazorPreRendering.Shared | |
@using BlazorPreRendering.Shared.Services | |
@inject IWeatherForecastService Service | |
<h1>Weather forecast</h1> | |
<p>This component demonstrates fetching data from the server.</p> | |
@if (forecasts == null) |