Skip to content

Instantly share code, notes, and snippets.

public class MainEntryPointClass : BaseClass
{
private ILogic Logic;
private IFileLogger FileLogger;
public MainEntryPointClass () : this(new Logic())
{
}
public IFileLogger FileLogger { get; set; } // For property injection for TDD or (e.g.) AutoFac
@jchannon
jchannon / gist:2171067
Created March 23, 2012 14:21 — forked from ianbattersby/gist:2159466
Factory Pattern FTW!
public class MainEntryPointClass : BaseClass
{
private ILogicFactory LogicFactory;
public MainEntryPointClass(ILogicFactory LogicFactory)
{
LogicFactory = LogicFactory;
}
public MainEntryPointClass() : this(new LogicFactory())
namespace NinjectTest
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public class Action : IGenre
{
public string GetTopTenMoviesInGenre()
@jchannon
jchannon / gist:3314090
Created August 10, 2012 13:08 — forked from idan/gist:3135754
A Sample Post

Hello there! This is a sample post for gist.io, a super-lightweight writing soapbox for hackers.

Now look up. Further. Above the post title. See that grey text with the gist ID?

Now back to me. That grey text is a link! Open that sucker in a new tab to see the source for this post. Also, I'm on a horse.

This is a major heading

If you peek at it with a web inspector, you'll see that it is a second-level heading. You can use first level headings, but they'll look just like the second level ones, and the gods of the HTML5 outlining algorithm will frown upon you.

public interface IRepository<T> : IDisposable
{
IQueryable<T> GetAll();
IQueryable<T> Query(string sql, params object[] args);
IQueryable<T> PagedQuery(long pageNumber, long pageSize, string sql, params object[] args);
T Get(object key);
void Add(T entity);
void Delete(T entity);
public class TestRenderContextFactory : IRenderContextFactory
{
private IViewResolver viewResolver;
private IViewCache viewCache;
public TestRenderContextFactory(IViewResolver viewResolver, IViewCache viewCache)
{
this.viewResolver = viewResolver;
this.viewCache = viewCache;
}
namespace NancyKatana
{
using Owin;
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.UseNancy();
}
var defaults = {
selectors: {
fullname: "#fullname",
firstname: "#firstname",
lastname: "#lastname"
}
};
var nameConcatenater = function (options) {
static void Main(string[] args)
{
Console.Write("Hello World!!");
Method1("Hi", 123);
}
public static void Method1(string myString, int myInt)
{
Method2(myString); //myInt does not appear by R# as not used
}
Hello there Twitter person,
It seems you have a programming problem and you'd like some help. There's a number
of (mostly) friendly people around here who can help - but first you will need to
provide us with some code that repoduces your problem and upload it to a github
repository (www.github.com). That way, we can download it, test it and see what's
wrong.
Thank you!