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 NUnit.Framework; | |
namespace DryIoc.IssuesTests | |
{ | |
[TestFixture] | |
public class Issue164_EventAggregatorImpl | |
{ | |
[Test, Explicit] | |
public void Able_to_handle_multiple_events_being_singleton() |
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
import Html exposing (..) | |
import Html.App as Html | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (..) | |
import String as String | |
main = | |
Html.beginnerProgram | |
{ model = model | |
, update = update |
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
import Html exposing (div, button, text, input, p) | |
import Html.App exposing (beginnerProgram) | |
import Html.Events exposing (onClick, onInput) | |
import Html.Attributes exposing (placeholder, value) | |
main = | |
beginnerProgram { model = model, view = view, update = update } | |
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
Func<Func<T,T,T>, Func<T,T,T>> Mapping<T>(Func<T,T> map) | |
{ | |
return reduce => (sum, item) => reduce(sum, map(item)); | |
} | |
Func<Func<T,T,T>, Func<T,T,T>> Filtering<T>(Func<T,bool> condition) | |
{ | |
return reduce => (sum, item) => condition(item) ? reduce(sum, item) : sum; | |
} |
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 BenchmarkDotNet.Attributes; | |
namespace Playground | |
{ | |
[MemoryDiagnoser] | |
public class DelegateVsInterfaceStruct | |
{ | |
[Params(10, 100, 1000)] public int ArraySize; |
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
/* | |
Results: | |
Compile Expression 3000 times: 814 | |
Invoke Compiled Expression 5000000 times: 724 | |
Emit from Expression 3000 times: 36 | |
Run Emitted Expression 5000000 times: 722 | |
*/ | |
using System; |
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 NUnit.Framework; | |
namespace DryIoc.IssuesTests | |
{ | |
[TestFixture] | |
public class Issue164_EventAggregatorImpl | |
{ | |
[Test] | |
public void Able_to_handle_multiple_events_being_singleton() |
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
Option Strict Off | |
Option Explicit Off | |
Imports System | |
Imports EnvDTE | |
Imports EnvDTE80 | |
Imports EnvDTE90 | |
Imports EnvDTE90a | |
Imports EnvDTE100 | |
Imports System.Diagnostics |
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
#define USE_EXPRESSION_INFO // I am here! | |
namespace NServiceBus | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
using System.Threading.Tasks; |
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 FP | |
{ | |
// final case class Cofree[F[_], A](head: A, tail: F[Cofree[F, A]]) | |
public interface ICofree<F, _, A> | |
{ | |
A Head { get; } | |
CofreeF Tail<CofreeF>() where CofreeF : ICofree<F, _, A>; | |
} |