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.Linq; | |
using System.Reflection; | |
using OpenRasta.Configuration; | |
using OpenRasta.DI; | |
// ReSharper disable CheckNamespace | |
namespace OpenRasta.Hosting.InMemory | |
// ReSharper restore CheckNamespace | |
{ |
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
Find / replace | |
Contract.Requires\<ArgumentNullException\>\(!String.IsNullOr(Empty|WhiteSpace)\({:i}\)\); | |
if (String.IsNullOrWhiteSpace(\1)) throw new ArgumentException("\1 was null or empty.", "\1"); | |
Contract\.Requires\<ArgumentNullException\>\({:i} \!\= null, .+\)\; | |
if (\1 == null) throw new ArgumentNullException("\1"); |
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
// ReSharper disable CheckNamespace | |
namespace System.Configuration | |
// ReSharper restore CheckNamespace | |
{ | |
public static class ConnectionStringSettingsCollectionExtensions | |
{ | |
// Connection strings by default just return null. We want something | |
// a bit more snappy. | |
public static string GetOrThrow(this ConnectionStringSettingsCollection connectionStrings, string name) | |
{ |
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.Net.FtpClient; | |
using NUnit.Framework; | |
namespace System.Net.FtpClient.Tests | |
{ | |
public class FtpClientTests | |
{ | |
[TestFixture] | |
public class when_constructing |
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.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
// see http://stackoverflow.com/questions/3975741/column-headers-in-csv-using-filehelpers-library/8258420#8258420 | |
// ReSharper disable CheckNamespace | |
namespace FileHelpers | |
// ReSharper restore CheckNamespace |
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.Reflection; | |
using Devart.Data.Oracle; | |
void PrintDevartOracleHome() | |
{ | |
// SUPER HACKY | |
// Get internal property OracleHomeCollection.SingletonInstance | |
var homes = (OracleHomeCollection)typeof(OracleHomeCollection) | |
.GetProperties(BindingFlags.Static | BindingFlags.NonPublic) |
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 FindStaticCtors | |
{ | |
[Test] | |
public void Foo() | |
{ | |
var typesWithCctors = new[] | |
{ | |
Assembly.GetAssembly(typeof(xyz)), |
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 Microsoft.Practices.Prism.Events; | |
// ReSharper disable CheckNamespace | |
namespace Microsoft.Practices.Prism.Events | |
// ReSharper restore CheckNamespace | |
{ | |
public static class CompositePresentationEventExtensions | |
{ | |
public static IObservable<TEventArgs> AsObservable<TEventArgs>(this CompositePresentationEvent<TEventArgs> @event) |
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
// ReSharper disable CheckNamespace | |
namespace RestSharp.Deserializers | |
// ReSharper restore CheckNamespace | |
{ | |
public class DynamicJsonDeserializer : IDeserializer | |
{ | |
public string RootElement { get; set; } | |
public string Namespace { get; set; } | |
public string DateFormat { 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
@echo off | |
rem Warning: this batch file deletes ALL Raven DB data and databases, leaving you with a totally empty (but ready to use) Raven DB instance. | |
net stop RavenDB | |
rd /S /Q C:\RavenDB\Server\Data | |
rd /S /Q C:\RavenDB\Server\Tenants | |
net start RavenDB |
OlderNewer