see https://github.com/aetos382/CSharpOdai/blob/main/20240101/Codes/README.md
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
| <Project DefaultTargets="Show"> | |
| <PropertyGroup> | |
| <!-- リテラルとして ; を書くとエスケープされない --> | |
| <NormalUnescapedProperty>a;b</NormalUnescapedProperty> | |
| <!-- プロパティ関数の結果として返された文字列はエスケープされる --> | |
| <AutomaticallyEscapedFunctionResultProperty>$([System.String]::Concat('a', ';', 'b'))</AutomaticallyEscapedFunctionResultProperty> | |
| <!-- 明示的に %NN という形式で書いた文字列もエスケープされた判定 --> | |
| <ExplicitlyEscapedProperty>a%3Bb</ExplicitlyEscapedProperty> |
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.Diagnostics; | |
| using System.Diagnostics.CodeAnalysis; | |
| using System.Runtime.CompilerServices; | |
| TestStandardUnion(); | |
| TestCustomUnion1(); | |
| TestCustomUnion2(); | |
| TestCustomUnion3(); |
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 Microsoft.Extensions.DependencyInjection.Extensions; | |
| using Microsoft.Extensions.Hosting; | |
| using Microsoft.UI.Xaml; | |
| namespace Microsoft.Extensions.DependencyInjection; | |
| internal static class WindowsAppServiceCollectionExtensions | |
| { |
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; | |
| using System.Threading.Tasks; | |
| using Microsoft.Extensions.DependencyInjection; | |
| using Microsoft.Extensions.Hosting; | |
| using Microsoft.Extensions.Logging; | |
| using Microsoft.Extensions.Options; | |
| using Microsoft.UI.Dispatching; | |
| using Microsoft.UI.Xaml; |
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.Collections.Concurrent; | |
| using System.Diagnostics; | |
| using System.Runtime.CompilerServices; | |
| using System.Runtime.ExceptionServices; | |
| Console.WriteLine(await S()); | |
| Console.WriteLine(await T()); | |
| try | |
| { |
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
| #!/usr/bin/env pwsh | |
| #Requires -Module Microsoft.PowerShell.PSResourceGet | |
| function Find-UpgradablePSResource { | |
| param( | |
| [string] $Repository = 'PSGallery', | |
| [switch] $Prerelease) | |
| $newestModules = | |
| Get-Module -ListAvailable | |
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.Diagnostics.CodeAnalysis; | |
| using System.Runtime.CompilerServices; | |
| var span = "abcdefg".AsSpan(); | |
| var original = span; | |
| Print(original); | |
| Print(span + 1); | |
| Print(span += 1); |
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.AspNetCore.Hosting; | |
| using Microsoft.AspNetCore.Http; | |
| using var host = new WebHostBuilder() | |
| .ConfigureServices(static services => | |
| { | |
| }) | |
| .Configure(static app => | |
| { | |
| app.Use(static _ => static context => context.Response.WriteAsync("Hello, ASP.NET Core 1")); |
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
| [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', 'AppPassword')] | |
| param( | |
| [Parameter(Mandatory)] | |
| [string] $AccountHandle, | |
| [Parameter(Mandatory)] | |
| [string] $AppPassword) | |
| function New-HashTag { |
NewerOlder