Skip to content

Instantly share code, notes, and snippets.

public class Test
{
[Theory]
[MyData((object)null)]
public void TestMethod(object data)
{
}
[Fact]
public class CompositeCompletion
{
private int _lockCount;
private bool _isTaskCreated = false;
private Action _completeAction;
private readonly object _syncObject = new object();
public IObservable<T> Add<T>(IObservable<T> observable)
{
@Ilchert
Ilchert / compose.yml
Created February 18, 2019 10:15
docker compose
version: '3.4'
services:
testserver:
image: ${DOCKER_REGISTRY-}testserver
build:
context: .
dockerfile: tests/TestServer/Dockerfile
ports:
- "11111:11111"
@Ilchert
Ilchert / Combinations.cs
Created March 1, 2019 11:06
8k string combinations
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
@Ilchert
Ilchert / Combinations.cs
Created March 1, 2019 13:22
Added span
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
@Ilchert
Ilchert / CombinationLong.cs
Last active March 1, 2019 15:25
Combination task on long
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
@Ilchert
Ilchert / ScheduleGenerator.cs
Created March 10, 2020 11:47
GenerateSchedule
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Scheduler
{
public class ScheduleGenerator
{
private readonly Graph _dependenciesGraph;
public class UnitTest1
{
private const string Enabled = @"
""Parameters"": {
""Enabled"": true,
""SecurityTypesIds"": [1, 2, 3]
}";
private const string EmptyParameters = "";
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Text.Json;
using System.Threading;
using System.Threading.Channels;
using System.Threading.Tasks;
@Ilchert
Ilchert / GetAsyncEnumerable.cs
Last active June 6, 2020 10:11
Read json array as async enumerable
public class Program
{
public static async Task Main(string[] args)
{
using var dataResponse = await client.GetAsync();
dataResponse.EnsureSuccessStatusCode();
await using var stream = await dataResponse.Content.ReadAsStreamAsync();
var pipe = PipeReader.Create(stream);