Geeks With Blogs
.Nettuce Code Salad
public class RouteFor<T> { readonly string path; string verbs; public static string Path { get { return GetRouteAttribute().Path; } } public static string Verbs { get { return GetRouteAttribute().Verbs; } } static RouteAttribute GetRouteAttribute() { var routeAttribute = TypeDescriptor.GetAttribute... ......

static class Program { static void Main(string[] args) { var serviceRunner = new ServiceRunner(); if (Environment.UserInteractive) { serviceRunner.Run(args); serviceRunner.Stop(); } else { var servicesToRun = new ServiceBase[] { new Service(serviceRunner) }; ServiceBase.Run(servicesToR... } } } class ServiceRunner { public void Run(string[] args) { ......

public static class ArgumentParser<T> where T : class, new() { delegate bool TryParseFunc<TProperty&g... input, out TProperty output); public static T Parse(string[] args, params Expression<Func<T, object>>[] propertiesToSet) { var target = new T(); var propertyList = propertiesToSet.ToList(); for (var i = 0; i < args.Count(); ......

It's time to start looking for the next gig; please get in touch if there's anything I can help you with



public static class TryParseExtensions { delegate bool TryParseFunc<T>(string input, out T output); static readonly ConcurrentDictionary<Type, Delegate> Delegates = new ConcurrentDictionary<Type, Delegate>(); static TryParseExtensions() { CacheTryParseFor<bool>... CacheTryParseFor<byte>... CacheTryParseFor<DateTim... ......

public static class ExpressionCache { static readonly ConcurrentDictionary<str... Action<object, object>> Setters = new ConcurrentDictionary<str... Action<object, object>>(); static readonly ConcurrentDictionary<str... Func<object, object>> Getters = new ConcurrentDictionary<str... Func<object, object>>(); ......

public static class HttpContextBuilder { public static HttpContext Build(string userName = null, string url = null) { var httpContext = new HttpContext(new HttpRequest("", url ?? "http://test", ""), new HttpResponse(new StringWriter())); if (!userName.IsNullOrWhiteSpa... { var principal = Substitute.For<IPrincipa... principal.Identity.Name.Ret... ......

object Bind(object requestDto, NameValueCollection formData) { var propertyGroups = formData.AllKeys.Where(x => x.Contains('.')).GroupBy(x => x.Substring(0, x.IndexOf('.'))); foreach (var group in propertyGroups) { var propertyName = group.Key; var propertyInfo = requestDto.GetType().GetPro... var propertyType = propertyInfo.PropertyType; ......

OSS project using .NET 4.5 async/await and Reactive Extensions. I've included an image scraper and console logger as examples of Observers

Seemingly forever I've been working on a business idea, it's a REST API delivering content to mobiles, and I've never really had much idea about its performance. Yes, I have a suite of unit tests and integration tests, but these only tell me that it works, not how well it works. I was also about to embark on a major refactor, swapping the database from ......

Copyright © Jon Canning | Powered by: GeeksWithBlogs.net | Join free