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
namespace Hmmm | |
{ | |
class SequentialTaskScheduler : TaskScheduler | |
{ | |
private readonly ConcurrentQueue<Task> _tasks = new ConcurrentQueue<Task>(); | |
private readonly TaskScheduler _executor; | |
private int _isRunning; | |
public SequentialTaskScheduler() : this(Default) | |
{ |
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; | |
using System.Collections.Generic; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using MyExchange.Common.Data; | |
using Qoden.Util; | |
using Qoden.Util.Serilog; | |
using Qoden.Validation; | |
using Serilog; |
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
public interface IMyBriefDto | |
{ | |
public string Name { get; set; } | |
public string Address { get; set; } | |
} | |
public interface IMyDto : IMyBriefDto | |
{ | |
public int Age { get; set; } | |
public string Country { get; set; } |
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
public class TestDbListener : DbListener | |
{ | |
private readonly BlockingCollection<List<DbListenerEvent>> _events = new BlockingCollection<List<DbListenerEvent>>(); | |
private readonly List<DbListenerEvent> _triggerErrorFlag = new List<DbListenerEvent>(); | |
private Exception _error; | |
public TestDbListener([NotNull] IOptions<DbListenerOptions> options) : base(options) | |
{ | |
} |
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
interface IBotOptionsVisitor<T> | |
{ | |
T Visit(CopyCatOptions copyCatOptions); | |
T Visit(VolGenOptions volGenOptions); | |
} | |
static class BotOptionsVisitor | |
{ | |
public static bool TryVisit<T>(JObject options, IBotOptionsVisitor<T> visitor, out T result) | |
{ |
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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "remote bot", | |
"type": "coreclr", |
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
contract Lottery { | |
//standard ERC20 staff | |
//TODO: separate ERC20 token from this contract? | |
uint public contestFinishTime; //dec 31 | |
//Lottery starts in OPEN state | |
//then transiton to PICK_WINNER | |
//then to CLOSED |
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; | |
using System.Diagnostics; | |
using System.Threading; | |
using Microsoft.Extensions.DependencyInjection; | |
using MyExchange.BackOffice.Client; | |
using MyExchange.Data; | |
using MyExchange.Test; | |
using MyExchange.Test.XUnit; | |
using Serilog; | |
using Xunit; |
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
interface IPersonRouter | |
{ | |
void EditPersonAddress(Address address); | |
} | |
public class PersonRouter : IPersonRouter | |
{ | |
private QodenController _root; | |
PersonRouter(QodenController root) { _root = root; } |
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; | |
using System.Threading; | |
using System.Linq; | |
using System.Collections.Generic; | |
public class Program | |
{ | |
private static int i = -1; | |
private static List<int> a = new List<int>() {1, 5, 6, 8}; | |
private static List<int> b = new List<int>() {3, 4, 1, 9}; |