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
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
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
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
/*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
(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
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
It used to be that if you wanted to write .NET code you would be completely reliant on Microsoft for their tools, frameworks and even their operating system. Now things are changing. The .NET open source community has grown in size, and with it, so have your options for frameworks and libraries. Microsoft have even annouced that they are building a cross platform CLR, so you are no longer reliant on Windows. The release of Roslyn and its rich code analysis API's is bringing with it a new wave of lightweight cross platfrom editors that can replace Visual Studio. | |
In this talk I will discuss some of these technologies, tools and libraries, and demonstrate their viability to show you that there is a new way of developing in the .NET world. |
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 Foo | |
{ | |
using System; | |
internal static class Guard | |
{ | |
internal static void EnsureNotNull(object argument, string argumentName) | |
{ | |
if (argument == 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
public RosylnController() | |
{ | |
_workspace = new AdhocWorkspace(); | |
_project = _workspace.AddProject("AdhocProject", LanguageNames.CSharp); | |
} | |
[Route("rename")] | |
public async Task<string> Post(string buffer, int line, int column, string newName) | |
{ | |
var document = _project.AddDocument("AdhocDocument", SourceText.From(buffer)); |
OlderNewer