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
CompareLogic compareLogic = new CompareLogic | |
{ | |
Config = new ComparisonConfig | |
{ | |
IgnoreConcreteTypes = true | |
} | |
}; | |
var obj1 = new object(); | |
var obj2 = new { Id = 1 }; |
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
var og = new ObjectIDGenerator(); | |
var a = new { Name = "A" }; | |
var b= new {Name = "A"}; | |
var c = a; | |
var aid = og.GetId(a, out var firstTime); | |
var bid = og.GetId(b, out firstTime); | |
var cid = og.GetId(c, out firstTime); |
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 Medallion.Shell; | |
using System.Buffers; | |
using System.Diagnostics; | |
using System.Runtime.CompilerServices; | |
using System.Text; | |
// Correct behavior | |
// Sends CTRL+C signal via external signaler process because | |
// Medallion creates a process with the option CreateNoWindow = true | |
// So the new process doesn't share the console with the parent |
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.Diagnostics; | |
// !!! This is not working example !!! | |
namespace GracefulTermination | |
{ | |
internal static class Program | |
{ | |
private static async Task Main() | |
{ | |
using var process = new Process |
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.Text; | |
namespace System.IO.Enumeration | |
{ | |
/// <summary> | |
/// Provides methods for matching file system names. | |
/// </summary> | |
public static class FileSystemName | |
{ |