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 SubmitOrder | |
{ | |
public SubmitOrder(int orderId) | |
{ | |
OrderId = orderId; | |
} | |
public int OrderId { get; private 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
(require 'package) | |
(add-to-list 'package-archives'("melpa" . "http://melpa.milkbox.net/packages/")) | |
(package-initialize) | |
(require 'smex) ; Not needed if you use package.el | |
(smex-initialize) ; Can be omitted. This might cause a (minimal) delay | |
; when Smex is auto-initialized on its first run. | |
(global-set-key (kbd "M-x") 'smex) | |
(require 'twittering-mode) |
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
/*jslint vars: true, plusplus: true, devel: true, nomen: true, regexp: true, indent: 4, maxerr: 50 */ | |
/*global define, $, brackets, window */ | |
define(function (require, exports, module) { | |
'use strict'; | |
var CodeHintManager = brackets.getModule('editor/CodeHintManager'), | |
EditorManager = brackets.getModule("editor/EditorManager"), | |
Helpers = require('modules/helpers'), | |
Omnisharp = require('modules/omnisharp'); |
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
var decision = "Dave".DecidesTo<InviteToLobby>(); | |
decision.ProvidedDataIs("something"); | |
decision.NewKnowledgeIs<InvitedToLobby>((e) => e.Something.ShouldBe("test")); | |
decision.IsAvailableWhen(() => new TestTopicInValidState()); | |
decision.IsntAvailableWhen<ExpectedException>(() => new TestTopicInInvalidState()); |
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 GameId : TypedGuid | |
{ | |
} | |
public class TypedGuid | |
{ | |
protected Guid Value { get; set; } | |
public static implicit operator Guid(TypedGuid typedGuid) | |
{ |
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 FooReserver | |
{ | |
private readonly int reserveFor; | |
public static List<string> ReservedFoos = new List<string>(); | |
public FooReserver(int reserveFor) | |
{ | |
this.reserveFor = reserveFor; | |
} |
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 Kata | |
{ | |
using System.Collections.Generic; | |
using System.Linq; | |
using Xunit; | |
public interface ICheckout | |
{ | |
void Scan(string item); |
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
[AttributeUsage(System.AttributeTargets.All, AllowMultiple = true, Inherited = true)] | |
public class ಠ_ಠAttribute : Attribute | |
{ | |
public ILog Log { get; set; } | |
public ಠ_ಠAttribute() | |
{ | |
Log.Info("This code is bad and you should feel bad"); | |
} | |
} |
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 Program | |
{ | |
public static void Main(string[] args) | |
{ | |
var store = Wireup.Init().UsingInMemoryPersistence().Build(); | |
var repository = new EventStoreRepository(store, new AggregateFactory(), new ConflictDetector()); | |
var handler = new CreatePostCommandHandler(repository); | |
handler.Execute(new CreatePostCommand(new Guid(), "Test Title", "Test Description")); | |
} |
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
class RandomObject | |
{ | |
public decimal? PropertyA { get; set; } | |
public decimal? PropertyB { get; set; } | |
} | |
class CalculatePropertyA : ICalculator | |
{ | |
string Name { get { return "PropertyA"; } } | |