Problem The story here is about a console application that replays to a test system string clauses already imported in […]
Category: .Net
Login script check
Problem I have written a script that sits on the admin portion on my website. Here I assume the user […]
Using TryXXX pattern to avoid exceptions
Problem I have been using the TryXXX and GetXXX pattern lately to give clients a choice whether to trap an […]
Avoiding Duplicate Boilerplate Code in WCF Service
Problem I’m responsible for maintaining a web service project in c#. I have one service class with a bunch of […]
Refactoring code into a simpler method
Problem I have some code that loops over a number and populates a list using other lists. I think I […]
.NET 4.5 licensing subsystem using RSA-4096 strong name key, SHA256 signed XML, and assembly signature enforcing
Problem Abstract For the past week I have been looking at taking advantage of the .NET 4.5 improvements to code […]
Best approach to combine repositories logic
Problem Let’s suppose I have 2 repositories: first is responsible for creating job and return jobId second is responsible for […]
Making sure initialization code is executed before other code using Lazy Initialization
Problem The Problem Recently I was told to refactor i.e. move some initialization logic from the constructor. I came up […]
BigDecimal class with arbitrary precision
Problem I recently came across a need to display very large decimal numbers and realized that I could use a […]
ResettableLazy: a resettable version of .NET Lazy
Problem I implemented a resettable version of .NET Lazy (context: mostly to use it in a MemoryCache for auto refresh […]