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 IndexComponent: ComponentBase | |
| { | |
| private IdentityUser _currentUser; | |
| [Inject] | |
| protected AuthenticationStateProvider AuthenticationStateProvider { get; set; } | |
| [Inject] | |
| protected UserManager < IdentityUser > UserManager { 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
| Import-Module posh-git | |
| Import-Module oh-my-posh | |
| Import-Module PSReadLine | |
| Set-PoshPrompt -Theme AgnosterPlus | |
| # Set-PoshPrompt -Theme jandedobbeleer | |
| Set-PSReadLineKeyHandler -Key Tab -Function Complete | |
| Set-PSReadlineOption -BellStyle None | |
| Set-PSReadLineOption -PredictionSource History |
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 MyConnectionManager : IMyConnectionManager | |
| { | |
| private readonly ILogger<MyConnectionManager> _logger; | |
| private readonly IMyScopedService _myScopedService; | |
| public MyConnectionManager(ILogger<MyConnectionManager> logger, IMyScopedService myScopedService) | |
| { | |
| _logger = logger; | |
| _myScopedService = myScopedService; | |
| } |
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 MyScopedService : IMyScopedService | |
| { | |
| private readonly ILogger<MyScopedService> _logger; | |
| public MyScopedService (ILogger<MyScopedService> logger) | |
| { | |
| _logger = logger; | |
| } | |
| public void DoSomething () |
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 void ConfigureServices(IServiceCollection services) | |
| { | |
| services.AddScoped<IMyScopedService, MyScopedService>(); | |
| services.AddSingleton<IMyConnectionManager, MyConnectionManager>(); | |
| } |
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
| version: 2 | |
| jobs: | |
| build: | |
| machine: true | |
| steps: | |
| - checkout | |
| # build image | |
| - run: | | |
| docker info |
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
| FROM microsoft/dotnet:2.2-sdk AS build-env | |
| WORKDIR /app | |
| # Copy csproj and restore as distinct layers | |
| COPY *.csproj ./ | |
| RUN dotnet restore | |
| # Copy everything else and build | |
| COPY . ./ | |
| RUN dotnet publish -c Release -o out |
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; | |
| using System.Collections.Generic; | |
| namespace SpanOfT_Dev | |
| { | |
| public class Program | |
| { | |
| private static void Main(string[] args) | |
| { | |
| int[] arr = { 1, 2, 3, 4, 5 }; |
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
| Array: | |
| 0 | |
| 0 | |
| 0 | |
| 0 | |
| 0 | |
| Span: | |
| 0 | |
| 0 | |
| 0 |
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; | |
| using System.Collections.Generic; | |
| namespace SpanOfT_Dev | |
| { | |
| public class Program | |
| { | |
| private static void Main(string[] args) | |
| { | |
| int[] arr = { 1, 2, 3, 4, 5 }; |