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
| # Scan all .csproj files and aggregate unique package versions | |
| $packages = Get-ChildItem -Filter *.csproj -Recurse | | |
| Get-Content | | |
| Select-String -Pattern '<PackageReference Include="([^"]+)" Version="([^"]+)"' -AllMatches | | |
| ForEach-Object { $_.Matches } | | |
| Group-Object { $_.Groups[1].Value } | | |
| ForEach-Object { @{ | |
| Name = $_.Name | |
| Versions = $_.Group.ForEach({ $_.Groups[2].Value }) | Select-Object -Unique | |
| }} | |
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 Microsoft.EntityFrameworkCore; | |
| using Microsoft.Extensions.Configuration; | |
| using Microsoft.Extensions.DependencyInjection; | |
| using Microsoft.Extensions.Hosting; | |
| using Serilog; | |
| namespace Console.Cli; | |
| internal sealed class Startup | |
| { |
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.Threading; | |
| static class Program { | |
| static void Main() { | |
| Console.Write("Performing some task... "); | |
| using (var progress = new ProgressBar()) { | |
| for (int i = 0; i <= 100; i++) { | |
| progress.Report((double) i / 100); |