Enum extension methods

using System; using System.Collections.Generic; using System.ComponentModel; using System.Globalization; using System.Linq; using System.Text; namespace Challenger.Global.Util.Extensions { public static class EnumExtensionMethods { public static T ParseAsEnumByDescriptionAttribute<T>(this string description) // where T : enum { if (string.IsNullOrEmpty(description)) { […]

Log4Net config

<?xml version=”1.0″ encoding=”utf-8″ ?> <configuration> <log4net> <appender name=”WindowsEventAppender” type=”log4net.Appender.EventLogAppender”> <param name=”LogName” value=”Application” /> <applicationName value=”Phoenix” /> <layout type=”log4net.Layout.PatternLayout”> <conversionPattern value=”%date [%thread] %-5level %logger%newline =&gt; %message%newline” /> </layout> <filter type=”log4net.Filter.LevelRangeFilter”> <param name=”LevelMin” value=”DEBUG” /> </filter> </appender> […]

Context Specification

tnamespace Example { using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using Rhino.Mocks; public abstract class ContextSpecification<T> { protected Exception executionException; protected T sut { get; set; } [TestInitialize] public void Start() { this.Context(); this.SetupMockResults(); this.Because(); } [TestCleanup] public […]