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 Program | |
{ | |
public static async Task Main() | |
{ | |
var results = Validate.If(() => "a" == "a") | |
//optional then branch | |
.Then(()=> | |
{ | |
Console.WriteLine("a equals a, so Then was executed"); | |
//some code |
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 SelectedDataPointViewModel | |
{ | |
private readonly LineSeries _series; | |
public DataPoint StartDataPoint { get; private set; } | |
public DataPoint CurrentDataPoint => _series.Points[SelectedDataPointIndex]; | |
public int SelectedDataPointIndex { get; set; } | |
public bool IsDragging { get; set; } | |
public float InitiationDistance { 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
param ($BasePath = './') | |
$CsProjects = Get-ChildItem -Path $BasePath -Filter '*.csproj' -File -recurse | |
foreach ($csProjFile in $CsProjects) | |
{ | |
$path = $csProjFile.FullName | |
Write-Host $path | |
$xml = [XML](Get-Content $path) |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace ConsoleApp1 | |
{ | |
public interface ISuffixAutomataState<T> | |
{ | |
bool IsTerminal { get; } |
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.Linq; | |
public sealed class StringGenerator | |
{ | |
private const int DefaultRandomStringLength = 10; | |
private static readonly Random Rnd = new Random(); | |
private volatile char[] _charDomain; | |
public char[] CharacterDomain |
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 static class PathHelper | |
{ | |
private static readonly string DataPath; | |
static PathHelper() | |
{ | |
var assembly = Assembly.GetAssembly(typeof(PathHelper)); | |
var codebase = assembly.CodeBase.Replace("file:///", ""); | |
var baseDir = Path.GetDirectoryName(codebase); | |
DataPath = baseDir; |
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 static class AssemblyReference | |
{ | |
/// <summary> | |
/// Installs reference to assembly in which specified type resides. | |
/// It will be copied on build even in release mode. | |
/// </summary> | |
/// <typeparam name="T"></typeparam> | |
[MethodImpl(MethodImplOptions.NoInlining)] | |
public static void Install<T>() | |
{ |
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; | |
using System.Diagnostics; | |
using System.Threading; | |
namespace ConsoleApplication1 | |
{ | |
/// <summary> | |
/// Performs synchronization between continuous collection and unknown collection. | |
/// For example, between continuous MSSQL table ids and unknown mapped id in other system, like ElasticSearch. |
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.Concurrent; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Threading; | |
namespace Helpers | |
{ | |
public sealed class LockScope |
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.IO; | |
using System.Runtime.Serialization; | |
using System.Runtime.Serialization.Json; | |
using System.Text; | |
using System.Xml; | |
namespace Helpers | |
{ | |
public static class JsonHelper |
NewerOlder