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
Paket version 2.15.6.0 | |
Resolving packages for group Main: | |
- Castle.Windsor-log4net 3.3.0 | |
- Castle.Core-log4net 3.3.3 | |
- log4net 1.2.10 | |
- Castle.Core 3.3.3 | |
- Castle.LoggingFacility 3.3.0 | |
- Castle.Windsor 3.3.0 | |
- NUnit 2.6.4 | |
Locked version resolution written to C:\Users\haussknecht\Documents\visual studio 2013\Projects\TestPaket\paket.lock |
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
#SingleInstance FORCE | |
;Volume UP Windows ALT + | |
#!+:: | |
Send {Volume_Up} | |
return | |
;Volume down Windows ALT - | |
#!-:: | |
Send {Volume_down} |
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
#Pack a ChromeApp / ChromeExtension | |
param( | |
[Parameter(Mandatory=$true)] | |
[string] | |
$dir, | |
[Parameter(Mandatory=$true)] | |
[string] | |
[string]$key | |
, |
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 string[] GetAvailableComPorts() | |
{ | |
var l = new List<string>(); | |
for (int i = 1; i < 20; i++) | |
{ | |
var portname = string.Format("COM{0}", i); | |
try | |
{ | |
using (var s = new System.IO.Ports.SerialPort(portname)) |
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 Account | |
Public Property Balance() As Decimal | |
Public Sub Transfer(ByVal amount As Decimal, ByVal toAccount As Account) | |
If amount > Balance Then | |
Throw New Exception(String.Format("Cannot transfer ${0}. The available balance is ${1}.", amount, Balance)) | |
End If | |
toAccount.Balance += amount | |
Balance -= amount |
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 Home : PersistentModule | |
{ | |
public Home() : base("/customers") | |
{ | |
Get["/browse/{firstLetter}"] = parameters => | |
{ | |
string firstLetter = parameters.firstLetter; | |
var customers = DocumentSession.Query<Customer>() | |
.Where(x => x.Name.StartsWith(firstLetter)) | |
.ToList(); |
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 abstract class PersistentModule : NancyModule | |
{ | |
protected PersistentModule() | |
{ | |
} | |
protected PersistentModule(string modulePath) : base(modulePath) | |
{ | |
} |
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 RavenAwareModuleBuilder : INancyModuleBuilder | |
{ | |
private readonly IViewFactory viewFactory; | |
private readonly IResponseFormatter responseFormatter; | |
private readonly IModelBinderLocator modelBinderLocator; | |
private readonly IRavenSessionProvider _ravenSessionProvider; | |
public RavenAwareModuleBuilder(IViewFactory viewFactory, IResponseFormatter responseFormatter, | |
IModelBinderLocator modelBinderLocator, | |
IRavenSessionProvider ravenSessionProvider) |
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 RavenBootstrapper : DefaultNancyBootstrapper | |
{ | |
protected override NancyInternalConfiguration InternalConfiguration | |
{ | |
get { return NancyInternalConfiguration.WithOverrides(x => x.NancyModuleBuilder = typeof (RavenAwareModuleBuilder)); } | |
} | |
} |
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 interface IRavenSessionProvider | |
{ | |
IDocumentSession GetSession(); | |
} | |
public class RavenSessionProvider : IRavenSessionProvider | |
{ | |
private static IDocumentStore _documentStore; | |
public static IDocumentStore DocumentStore |