Slimming down your build – don’t copy the intellisense files!

So you know how a lot of nuget packages include intellisense XML files and they get copied to your output binaries folder during build? I did a quick web search but soon for how to fix this, but soon gave up and resorted to searching my msbuild .targets files instead. Finally I found it. The…

0

Is Autofac magical – part II

Now that you’ve read part I perhaps you can answer this. What does this code do?     class FO : IEnumerable    {         public IEnumerator GetEnumerator()        {            throw new NotImplementedException();        }    }     class Program    {        static void Main(string[] args)        {            var cb = new ContainerBuilder();            cb.Register(ctx => new FO()).As<IEnumerable>().InstancePerLifetimeScope();            cb.Register<Func<FO>>(ctx => { return ()…

0

Is Autofac magical?

The answer is yes! OK let me explain. I never registered anything as Func<IObservable<object>> and yet the below code still works. It turns out to be that not only does autofac understand Func<Dependency>(), it understands a whole bunch of things that you may or may not have intended to be dependency relationships. 🙂 The details…

0

Distilling some ideas for keeping that data access code (and test code) tidy…

I just spent a while doing some refactoring. It turned out to be a very long while, probably much more than I would have originally estimated. (Part of the reason for that is builds and tests that take a long time…) The changes I made were somewhat haphazard at first, and I wasn’t sure why I thought…

0

Request and connection throttling when self hosting with OwinHttpListener

[Disclaimer before we begin: I’m not really an expert on OWIN (henceforth ‘owin’) or HttpListener – I just researched this as best I could myself so I may get some stuff wrong. Question my authority!] Self-hosting a web server using owin instead of using IIS is an attractive option to me partly because of the…

0

Exploring F# (1)

C# and typescript are starting to feel too familiar and dull, so I went exploring. I fired up my first F# console app, and learned a few things. I’m taking a very lazy almost-but-not-quite-just-in-time approach to learning where I ask newbie stack overflow questions as I go along whenever I can’t find the answer with…

1