Category Archive | C#

Category Archive | C# RSS

Generic Enumeration Class

Written By : Lam Chan

One of my key tools when starting a new project is leveraging Jimmy Bogard's enumeration class .  The reason is simple, it is just a hell lot better than the .Net enum struct allowing us to do reverse lookups with some added benefits of storing side values such as display names there b [...]

Read More

Generating Links In MVC with Port Translation Backend

Written By : Lam Chan

I worked in network / server environment where the url requested was redressed by the time the web server received the payload at the network layer.  So here is an example, the user types in the user http://www.yourdomain.com/home/blog, by the time the payload reached the webserver, the net [...]

Read More

C# with Rosyln

Written By : Lam Chan

Rosyln is a compiler as a service for the .Net stack.  You can use it to get code metrics and meta information all the way to compiling code on the fly.  Rosyln is in CTP Release 2 as we speak.  I've been tinkering with a simple CSharp script engine to see if it was possible. [...]

Read More

Glimpse 1.7+ with Dapper Profiling

Written By : Lam Chan

I previously wrote an article on this when Dapper was in it's first year of development here .  After that project, I moved on to using MiniProfiler but now I'm back to using Glimpse since it has made much more headway with improvements.   To get started, Glimpse sti [...]

Read More

RestSharp Async NullReferenceException

Written By : Lam Chan

Background This year, I've been converting a lot of C# applications for my clients to use the new Task<> feature where appropriate.  The most common place where this can be used is when you are running code that has out of process calls where waiting is required.  I ten [...]

Read More

Widespread IoC Usage Flaw

Written By : Lam Chan

IoC in general is a very good thing if used correctly for the right purpose.  It helps support 5 principles of SOLID .  But in general, the usage of IoC frameworks are overly abused. Abstracting Binding Syntax  Pretty much everywhere I've consulted for, the usage [...]

Read More

Performance Timers

Written By : Lam Chan

When I build out API's or services type applications, I tend to go a little heavy on the logging so that it is easy to identify issues with the processing.  I am the type of developer who does not like to scour through event logs for exceptions and then have to back trace that to the co [...]

Read More

RestAssured

Written By : Lam Chan

I've been hard at work creating a testing framework from the perspective of QA usage.  After writing REST Api's for the past couple years, I never realized that lack of testing framework until now.  I've based my work off of Google RestAssured but make some choices to add o [...]

Read More