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.AspNetCore.Razor.TagHelpers; | |
namespace Codehaks.TagHelpers | |
{ | |
public class StarsTagHelper : TagHelper | |
{ | |
public int Level { get; set; } | |
public override void Process(TagHelperContext context, TagHelperOutput output) | |
{ |
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
<i class="fa fa-star" style="color:#ffd800"></i> | |
<i class="fa fa-star" style="color:#ffd800"></i> | |
<i class="fa fa-star" style="color:#ffd800"></i> | |
<i class="fa fa-star-o"></i> | |
<i class="fa fa-star-o"></i> |
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
@page "/test/partial" | |
@{ | |
ViewData["Title"] = "UserPartialView"; | |
var watch = System.Diagnostics.Stopwatch.StartNew(); | |
int count = 10000; | |
} | |
<h2>Performance Test : Partial View</h2> | |
<hr /> | |
@for (int i = 1; i < count + 1; i++) | |
{ |
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
@page "/test/tag" | |
@{ | |
ViewData["Title"] = "UserPartialView"; | |
var watch = System.Diagnostics.Stopwatch.StartNew(); | |
int count = 10000; | |
} | |
<h2>Performance Test : TagHelper</h2> | |
<hr /> | |
@for (int i = 1; i < count+1; i++) |
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
Test |
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 EmailSender : IEmailSender | |
{ | |
public Task SendEmailAsync(string email, string subject, string message) | |
{ | |
SmtpClient client = new SmtpClient("mail.mysite.com") | |
{ | |
UseDefaultCredentials = false | |
}; | |
client.Credentials = new NetworkCredential("noreply@mysite.com", "password"); |
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.Threading.Tasks; | |
namespace PhotoSlash | |
{ | |
class Program | |
{ | |
static async Task Main(string[] args) | |
{ |
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 LinqLab.API; | |
using LinqLab.Models; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Logging; | |
using MoreLinq; | |
using System; | |
using System.Linq; |