- Application Collaboration Realization Application Component
- Application Collaboration Realization Application Event
- Application Collaboration Realization Application Function
- Application Collaboration Realization Application Interaction
- Application Collaboration Aggregation Application Interface
- Application Collaboration Realization Application Interface
- Application Collaboration Realization Application Process
- Application Collaboration Assignment Application Service
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 partial class Something | |
| { | |
| public partial IReadOnlyCollection<string> Stuff { get; } | |
| public partial void AddText(string text); | |
| } | |
| public partial class Something | |
| { | |
| private readonly List<string> stuff = []; | |
| public partial IReadOnlyCollection<string> Stuff { get => [..stuff]; } |
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
| /// <summary> | |
| /// A base class that implements a singleton pattern. | |
| /// <example> | |
| /// Declaring a singleton class: | |
| /// <code> | |
| /// public class Singleton : SingletonBase<Singleton> | |
| /// { | |
| /// public int Number { get; set; } | |
| /// } | |
| /// </code> |
Directory.EnumerateFiles is slightly faster (12%) for simply searching all subdirectories for files with a certain extension. (e.g. **/*.cs)
| Method | Mean | Error | StdDev |
|---|---|---|---|
| Globbing | 98.14 ms | 1.930 ms | 2.222 ms |
| DirectoryEnumerateFiles | 86.32 ms | 1.695 ms | 2.376 ms |
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.Security.Cryptography; | |
| using System.Security.Cryptography.X509Certificates; | |
| namespace ProofsOfConcept.Tests; | |
| public class SignDataAndVerifySignatureShould | |
| { | |
| private readonly byte[] generatedPfxBytes = CreateX509CertificatePfxBytes(PfxPassword); | |
| private const string PfxPassword = "StrongPassword123!"; |
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
| <# | |
| .SYNOPSIS | |
| Move a file to a new location but leave a symbolic link behind | |
| .DESCRIPTION | |
| . | |
| .PARAMETER SourcePath | |
| The path to the existing file to move and replace with a symbolic link. | |
| .PARAMETER TargetPath | |
| The target directory where the non-symbolic link file should be moved. | |
| .PARAMETER Verify |
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
| git init . && echo "# $(split-path -Leaf $PWD)" > README.md && git add . && git commit -m "Initial commit." && gh repo create --source=. --public --push; |
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
| gh api rate_limit --jq '.resources | keys[] as $k | "GitHub \($k): \(.[$k].used) of \(.[$k].limit)"' |
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
| // Example in helper process (e.g., RestartService.exe) | |
| using System.ServiceProcess; | |
| using System.Threading; | |
| public class Program | |
| { | |
| public static void Main(string[] args) | |
| { | |
| if (args.Length > 0) | |
| { |
NewerOlder