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
open System | |
type Value = | |
| MyInt of int | |
| MyRational of int * int | |
type Expression = | |
| MyValue of Value | |
| Addition of Expression * Expression |
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; | |
namespace DoubleDispatch | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var expression = new Addition( | |
new MyInt(3), |
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; | |
namespace OOPvsFP | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var expression = new Addition( | |
new MyInt(3), |
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; | |
namespace Visitor | |
{ | |
class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
var expression = new Addition( | |
new MyInt(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
using System; | |
namespace CSharpDoubleDispatch | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var op1 = new MyInt(5); | |
var op2 = new MyRational(2, 3); |
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.Runtime.CompilerServices; | |
using System.Threading.Tasks; | |
namespace StateMachineConceptual | |
{ | |
class Program | |
{ | |
static async Task Main() | |
{ |
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.Runtime.CompilerServices; | |
using System.Runtime.InteropServices; | |
using System.Threading.Tasks; | |
public static class MyClass | |
{ | |
[StructLayout(LayoutKind.Auto)] | |
[CompilerGenerated] |
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 struct AsyncTaskMethodBuilder | |
{ | |
private IAsyncStateMachine _stateMachine; | |
private Action _moveNextRunner; | |
public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine) | |
where TAwaiter : ICriticalNotifyCompletion | |
where TStateMachine : IAsyncStateMachine | |
{ | |
if (_stateMachine == null) |
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 Confluent.Kafka; | |
using Confluent.Kafka.Admin; | |
namespace KafkaConnectivity; | |
public static class Program | |
{ | |
private const int PartitionsCount = 2; | |
private const string TopicName = "my_topic"; | |
private const string BootstrapServers = "localhost:9092,localhost:9093"; |
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
{ | |
"title": "Root Schema", | |
"type": "object", | |
"default": {}, | |
"required": [ | |
"checked", | |
"dimensions", | |
"id", | |
"name", | |
"price", |
OlderNewer