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 Postcode | |
{ | |
private readonly string value; | |
public Postcode(string value) | |
{ | |
if (CheckPostcodeIsValid(value)) | |
{ | |
throw new InvalidPostcodeException(); | |
} |
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
Set-ExplorerOptions - showHiddenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
Enable-RemoteDesktop | |
cinst steam | |
cinst googlechrome | |
cinst git | |
cinst 7zip | |
cinst atom | |
cinst skype | |
cinst nodejs |
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
{ | |
"fansz": { | |
"aliases": {}, | |
"mappings": { | |
"users": { | |
"properties": { | |
"backgroundImage": { | |
"type": "string" | |
}, | |
"backgroundImageAspectRatio": { |
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
static void Main(string[] args) | |
{ | |
////////// Setup Elastic | |
var node = new Uri("http://localhost:9200"); | |
var settings = | |
new ConnectionSettings(node).SetDefaultIndex("fansz") | |
.MapDefaultTypeNames(m => m.Add(typeof(UserElastic), "users")); | |
var client = new ElasticClient(settings); |
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
[TestFixture] | |
public class WhenCreatingANewUser | |
{ | |
private ConfigurableContext _configurableContext; | |
[TestFixtureSetUp] | |
public void Setup() | |
{ | |
_configurableContext = new ConfigurableContext<WriteContext>(x => | |
{ |
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 Settings | |
{ | |
public Settings() | |
{ | |
SomeString = Helpers.GetSetting("SomeString", "DefaultString"); | |
SomeInt = Helpers.GetSetting("SomeInt", 9, int.TryParse); | |
SomeTimeSpan = Helpers.GetSetting("SomeTimeSpan", new TimeSpan(60), Helpers.TimeSpanParser); | |
} | |
public string SomeString { get; 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
{ | |
"locked": false, | |
"version": -9998, | |
"projectFileDependencyGroups": { | |
"": [ | |
"riakclient >= 2.1.0" | |
], | |
"DNX,Version=v4.5.1": [], | |
"DNXCore,Version=v5.0": [ | |
"System.Console >= 4.0.0-beta-*" |
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)); |
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
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. |