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
# Tools | |
.\NuGet.exe i DotCover -s \\myserver\Dev\NuGetPackages -o Tools | |
.\NuGet.exe i StyleCopCmd -s \\myserver\Dev\NuGetPackages -o Tools | |
# Dependecies | |
$packageConfigs = Get-ChildItem . -Recurse | where{$_.Name -eq "packages.config"} | |
foreach($packageConfig in $packageConfigs){ | |
Write-Host "Restoring" $packageConfig.FullName | |
.\nuget.exe i $packageConfig.FullName -o Source\Packages | |
} |
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
OpenWrap.desc file: | |
name: Company.Component-%BranchName% | |
depends: Xunit | |
depends: Compare-NET-Objects | |
depends: Moq | |
depends: NLog | |
depends: openwrap | |
depends: Xunit.Extensions |
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
.\NuGet.exe i psake -o tools -x | |
.\o.exe -ShellInstall none add-remote nuget nuget://packages.nuget.org/v1/FeedService.svc/Packages | |
.\o.exe -ShellInstall none update-wrap |
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 System.Collections.Generic | |
{ | |
using System.Linq; | |
public static class IEnumerableExtensions | |
{ | |
// Why ForEach extension is not included on IEnumerable<T> by default http://blogs.msdn.com/b/ericlippert/archive/2009/05/18/foreach-vs-foreach.aspx | |
public static void ForEach<T>(this IEnumerable<T> source, Action<T> action) |
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 RavenDbTransactionTest | |
{ | |
[Fact] | |
public void RemoteDocumentStore_ShouldNotThrow() | |
{ | |
var documentStore = new DocumentStore() | |
{ | |
Url = "http://localhost:8080" | |
}; | |
documentStore.Initialize(); |
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 NHibernateTransactionTest | |
{ | |
[Fact] | |
public void NHibernateSave_ShouldNotThrow() | |
{ | |
var sessionFactory = Fluently.Configure() | |
.Database(MsSqlConfiguration | |
.MsSql2008 | |
.ConnectionString(c => c | |
.Server("localhost") |
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 (var server = new WebSocketServer("ws://localhost:8181")) | |
{ | |
server.Start(connection => { }); | |
} | |
24/01/2012 21:29:32 [Info] Server started at ws://localhost:8181 | |
24/01/2012 21:29:32 [Error] Listener socket is closed System.AggregateException: | |
One or more errors occurred. ---> System.ObjectDisposedException: Cannot access | |
a disposed object. | |
Object name: 'System.Net.Sockets.Socket'. |
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
private static void Main(string[] args) | |
{ | |
var server = new WebSocketServer("ws://127.0.0.1:8181"); | |
server.Start(socket => | |
{ | |
socket.OnOpen = () => Console.WriteLine("Open!"); | |
socket.OnClose = () => Console.WriteLine("Close!"); | |
socket.OnError = ex => Console.WriteLine("Server: " + ex); | |
socket.OnMessage = message => | |
{ |
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 WinPhoneKit.Storage | |
{ | |
using System; | |
using System.IO.IsolatedStorage; | |
public static class IsolatedStorage | |
{ | |
private static readonly IsolatedStorageSettings isolatedStorage = IsolatedStorageSettings.ApplicationSettings; | |
public static void Add<TEntity>(string key, TEntity entity) |
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
//Guard clauses / contracts omitted for berivity | |
//Thread safety not considered. | |
public interface IKeyValueStore | |
{ | |
void Add<T>(string key, T item); | |
void AddOrUpdate<T>(string key, T item); | |
bool Remove(string key); |
OlderNewer