News for hackers. Stuff that matters.
Re:The microservices cargo cult by togusa on Tuesday October 06, 2015 @10:17AM (#10339025)
It's a real library I wrote. I just noticed I missed the brackets. Quick example you can infer the rest from:

Code:

    public static class IntegerExtensions
    {
        public static TimeSpan Minutes(this int val)
        {
            return TimeSpan.FromMinutes(val);
        }
    }

Usage examples I can think of:

   var eightMinutes = 8.Minutes();
   var tenMinutes = 8.Minutes() + 2.Minutes();
   DoSomethingEvery(8.Minutes());
Re:The microservices cargo cult by gregmac on Tuesday October 06, 2015 @10:34AM (#10339130)
Yeah I figured. Is it published/OSS?
Re:The microservices cargo cult by togusa on Tuesday October 06, 2015 @10:42AM (#10339180)
Not at the moment. I've got a ton of stuff I probably could publish however.
Re:The microservices cargo cult by jmcqk6 on Wednesday October 07, 2015 @10:53AM (#10346362)
Just a note, because I started in the same way you have, simply writing my own extension methods in a common dll. The Humanizer library has a bunch of these features, including the 6.minutes() functionality:

https://github.com/MehdiK/Humanizer