-
Install SublimeREPL package from package control
-
Install scriptcs package from package control
-
Download this experimental build of scriptcs and extract to some folder on your machine
-
go to ~/.config/sublime-text-2/Packages/SublimeREPL/config/ScriptCS and open Main.sublime-menu file
-
Update the "linux" path in that file to "linux": ["mono", "PATH/TO/YOUR/scriptcs.exe", "-modules", "mono", "-repl"]
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 WebApi : IScriptPackContext { | |
public WebApi(ILog logger, IControllerTypeManager typeManager) { | |
... | |
} | |
} | |
public class WebApiScriptPack : IScriptPack | |
{ | |
private readonly ILog _logger; | |
private readonly IControllerTypeManager _typeManager; |
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
desc "Checks .csproj files for StyleCop.MSBuild target" | |
task :verify_stylecop_msbuild do | |
projectFiles = FileList["./**/*.csproj"] | |
projectFiles.each{|f| | |
doc = Nokogiri::XML(File.open(f)) | |
target = doc.css('PropertyGroup > StyleCopMSBuildTargetsFile') | |
if (target.empty?) | |
puts "#{f} has no stylecop.msbuild" | |
else | |
puts "#{f} is ok" |
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
#load "bootstrapper.csx" //setup rootpathprovider and other stuff | |
public class IndexModule : NancyModule | |
{ | |
public IndexModule() | |
{ | |
Get["/"] = x => { | |
return View["index"]; | |
}; | |
} |
In case anyone is interested, the faster FakeItEasy 1.19.0 startup does indeed seem to be faster. I started using 1.19.0 at the Day Job today, and got these results for a test run in the IDE (ReSharper test runner):
shadow copies | no shadow copies | |
---|---|---|
1.18.0 | 5.9s | 2.5s |
1.19.0 | 0.86s | 0.63s |
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
That's not really a pattern and more a tooling thing. | |
Sometimes scenarios have behaviour that has multiple aspects, which individually are worthless but together have worth. | |
So contrived scenario ahead | |
Given a Spline | |
When it's Retriculated | |
Then it beeps | |
And it flashes |
-
Update VS Code settings to treat
.csx
as.cs
win: C:\Users\username\AppData\Local\Code\app-0.1.0\resources\app\plugins\vs.language.csharp\ticino.plugin.json os x: \AppData\Local\Code\app-0.1.0\resources\app\client\vs\languages\vs.language.csharp\ticino.plugin.json
There is an extensions array there tht you should modify.
- Get
omnisharp-roslyn
and build
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
#load "bootstrapper.csx" | |
public class IndexModule : NancyModule | |
{ | |
public IndexModule() | |
{ | |
Get["/"] = x => { | |
return View["index"]; | |
}; | |
} |
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
#r Owin; | |
#r Microsoft.Owin.Hosting; | |
using Owin; | |
using Microsoft.Owin.Hosting; | |
var url = "http://localhost:8080"; | |
using (WebApp.Start(url, Configure)) | |
{ |
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 System.Diagnostics; | |
using System.IO; | |
using System.Threading.Tasks; | |
class App | |
{ | |
public static int ExecuteProcess( | |
string fileName, | |
string arguments, |
OlderNewer