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
-- Create a variable table to hold the results of sp_who2 for querying purposes | |
DECLARE @who2 TABLE ( | |
SPID INT NULL, | |
Status VARCHAR(1000) NULL, | |
Login SYSNAME NULL, | |
HostName SYSNAME NULL, | |
BlkBy SYSNAME NULL, | |
DBName SYSNAME NULL, | |
Command VARCHAR(8000) 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
public interface IGetData | |
{ | |
IEnumerable<MyData> Execute(); | |
} | |
public interface IProcessData | |
{ | |
IEnumerable<MyProcessedData> Execute(IEnumerable<MyData> data); | |
} |
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
// Pretend more profound implementation, where the privates are actually involved and complicated. | |
public class Foo | |
{ | |
public object DoThing() | |
{ | |
return DoAPartOfThing(); | |
} | |
public object UndoThing() |
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 Foo | |
{ | |
public virtual void Entry() | |
{ | |
Zed(); | |
for (int round = 1; round < 10; round++) | |
{ | |
Bwar(); | |
Aroo(); | |
Rakanishu(); |
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 Foo | |
{ | |
public Foo(IService1 service1, IService2 service2, IService3 service3, IService4 service4, IService5 service5) | |
{ | |
// ... | |
} | |
} |
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
// This seems to work with the differences between NUnit runner, ReSharper runner, and dotCover runner - have not yet tested w/ team city dotCover. | |
/// <summary> | |
/// NUnit test runner and ReSharper test runner start from different directories. Get a consistent start directory for the runners. | |
/// </summary> | |
/// <example> | |
/// ReSharper: | |
/// C:\Users\myUser\Documents\project\test\NameSpace.Tests\bin\Release\ | |
/// Nunit: | |
/// C:\Users\myUser\Documents\project\test\NameSpace.Tests\ |
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 IFoo { } | |
public class Something<TFoo> | |
where TFoo : IFoo | |
{ | |
public void DoSomething(TFoo foo) | |
{ | |
} | |
} |
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; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
Thing thing = new Thing(); | |
for (int i = 0; i < thing.GetIterations; i++) | |
{ |
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 IFoo { } | |
public class FooOne : IFoo { } | |
public class FooTwo : IFoo { } | |
public class FooFourtyTwo : IFoo { } | |
public class FooFace : IFoo { } | |
public class FooNull : IFoo { } | |
public class Whatever | |
{ | |
public IFoo GetFoo(bool someFlag, string someLabel) |
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 readonly List<Tuple<bool, string, IFoo>> myTypes = new List<Tuple<bool, string, IFoo>>() | |
{ | |
new Tuple<bool, string, IFoo>(true, "Test", new FooOne()), | |
new Tuple<bool, string, IFoo>(true, "blah blah", new FooTwo()), | |
new Tuple<bool, string, IFoo>(false, "Test", new FooFourtyTwo()), | |
new Tuple<bool, string, IFoo>(false, "blah blah", new FooFace()), | |
}; | |
public void Thinger() | |
{ |
OlderNewer