Skip to content

Instantly share code, notes, and snippets.

@Saanch
Saanch / ConsoleWriter.cs
Last active August 29, 2015 14:10
Console Writer
public static void Info(string message, params object[] args)
{
Console.ForegroundColor = ConsoleColor.Cyan;
Console.WriteLine(message, args);
Console.ResetColor();
}
public static void Debug(string message, params object[] args)
{
Console.ForegroundColor = ConsoleColor.Yellow;
@Saanch
Saanch / windowsservice_install.md
Created November 22, 2014 06:01
Windows service install steps
  1. Move to the dotnet framework path cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319
  2. Get the service path C:\Services\XXXX.exe
  3. Run command InstallUtil.exe C:\Services\XXXX.exe
[color]
branch = auto
interactive = auto
diff = auto
status = auto
[user]
name = ####
email = ######
[remote "origin"]
receivepack = git receive-pack
@Saanch
Saanch / StructureMapJobFactory.cs
Last active December 6, 2018 11:27
StructureMapJobFactory Quartz.net IoC using StructureMap
public class StructureMapJobFactory : IJobFactory
{
private static readonly ILog Logger = LogProvider.GetCurrentClassLogger();
private readonly IContainer _container;
public StructureMapJobFactory(IContainer container)
{
this._container = container;
}
// Original code by Joachim Lykke Andersen; http://devtalk.dk/2011/02/16/Workaround+EF+Code+First+On+AppHabour.aspx
using System.Data.Entity;
using System.Data.Entity.Database;
using System.Data.Entity.Design;
using System.Data.Entity.Infrastructure;
using System.Data.Metadata.Edm;
using System.Data.Objects;
using System.Globalization;
using System.Linq;