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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var stopwatch = new Stopwatch(); | |
stopwatch.Start(); | |
RunParallelly().Wait(); | |
stopwatch.Stop(); |
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 UserStore : | |
UserStore<User, Role, string, UserLogin, UserRole, UserClaim> | |
{ | |
private bool disposed; | |
public UserStore(DbContext context) | |
: base(context) | |
{ | |
} |
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
type Result<'a> = | |
| Success of 'a | |
| Failure of string list | |
module Result = | |
let map f xResult = | |
match xResult with | |
| Success x -> |
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; | |
namespace ClassLibrary3 | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
var service = new PaymentService( |
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; | |
namespace ClassLibrary3 | |
{ | |
public interface IProduct | |
{ | |
} | |
public class Foo : IProduct | |
{ |
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 interface IFactory<T> | |
{ | |
T Create(); | |
} | |
public class CacheFactory<T> : IFactory<T> | |
{ | |
private T cached; | |
private readonly object syncLook = new object(); |
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 interface IPageViewTracker | |
{ | |
IDisposable Track(Page page); | |
} | |
public class NamedPageViewTracker : IPageViewTracker | |
{ | |
public NamedPageViewTracker( | |
IPageViewTracker innerTacker, IPageViewNameProvider provider) | |
{ |
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
namespace ArticleHarbor.DomainModel | |
{ | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.Data.Entity; | |
using System.Data.Entity.Infrastructure; | |
using System.Linq; | |
using System.Linq.Expressions; |
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
namespace Jwc.Experiment.Xunit | |
{ | |
using System; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
using Moq; | |
public static class Mocked | |
{ |
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
namespace Jwc.MoqExtensions | |
{ | |
using Moq; | |
using System; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
using Xunit; | |
public interface IFoo |
NewerOlder