This is a personal memorandum. Thanks to those who shared their articles!
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
function Install-LatestWinGet ([switch]$SkipInstallVCLibs) { | |
# Install prerequisites | |
if (-not $SkipInstallVCLibs) { | |
$vcLibsUrl = 'https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx' | |
Write-Host -ForegroundColor Green "Download $vcLibsUrl" | |
Add-AppxPackage -Path $vcLibsUrl | |
} | |
# Find the latest assets url | |
$latest = Invoke-RestMethod -Uri 'https://api.github.com/repos/microsoft/winget-cli/releases/latest' |
This document now exists on the official ASP.NET core docs page.
- Application
- Request Handling
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 namespace System.Management.Automation | |
using namespace System.Management.Automation.Language | |
if ($host.Name -eq 'ConsoleHost') | |
{ | |
Import-Module PSReadLine | |
} | |
#Import-Module PSColors | |
#Import-Module posh-git | |
Import-Module -Name Terminal-Icons |
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.Text; | |
using System.Text.RegularExpressions; | |
namespace MainColorConsole | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
コミットメッセージのバリデーションには commitlint
( https://github.com/conventional-changelog/commitlint ) を使用します。
またコミットメッセージは次の規約に準拠します。
https://github.com/conventional-changelog/commitlint/tree/master/@commitlint/config-conventional
コミットメッセージのフォーマットは次の通りです。
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
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"copyOnSelect": false, | |
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", | |
// Add custom keybindings to this array. | |
// To unbind a key combination from your defaults.json, set the command to "unbound". | |
// To learn more about keybindings, visit https://aka.ms/terminal-keybindings | |
"keybindings": | |
[ | |
// Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json. |
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.Threading.Tasks; | |
using System.Data.SqlClient; | |
using System.Data; | |
namespace Samples | |
{ | |
public abstract class BaseRepository | |
{ | |
protected async Task<T> DbAction<T>(Func<IDbConnection, Task<T>> action, string connectionString = null) |
そんなに深くない気がしますが。Microsoft.Extensions.DependencyInjection
の DI についてざっくりまとめた記事です。なお、長いので、Microsoft.Extensions.DependencyInjection
を M.E.DI
と略します。
例によって、公式ドキュメント にすべて書いてある、はずですが、ここでは少し別の観点でまとめてみます。また、ドキュメントに書いてない(と思う)内部実装についてもいくつか書いてあります。
IServiceCollection
の拡張メソッドを使用して、フレームワークやランタイムが提供するIServiceCollection
の実装に対して登録していきます。IServiceCollection
はServiceDescriptor
というサービスについてのスペックを表すオブジェクトのコレクションである。ServiceDescriptor
はサービス型をキーにして、ライフタイムと実装を持ちます。
NewerOlder