tomdupont.net
Tom DuPont .NET: May 2015
http://www.tomdupont.net/2015_05_01_archive.html
Tom DuPont .NET. I'm a tool, so you don't have to be. Saturday, May 30, 2015. NET Generic Overloads: How to support T and IList. What happens when you want to overload a generic method where the first method accepts a single object and the other accepts an IList of that type? It will only work when specifically try to pass in an IList. If you try to pass in a List it will fail because the compiler will identify the generic parameter overload and fail before trying to use the implicit cast to an IList.
tomdupont.net
Tom DuPont .NET: January 2015
http://www.tomdupont.net/2015_01_01_archive.html
Tom DuPont .NET. I'm a tool, so you don't have to be. Saturday, January 31, 2015. Making jQuery a bit more Angular. One of my favorite features of AngularJS. Is the use of HTML attributes to apply controllers and directives directly to your DOM elements. Why is this so useful? It is intuitive for developers to discover what code is being applied to elements. It enables generic registration, removing boiler plate document ready methods. This is how we can make jQuery a bit more Angular. What do you do whe...
tomdupont.net
Tom DuPont .NET: October 2014
http://www.tomdupont.net/2014_10_01_archive.html
Tom DuPont .NET. I'm a tool, so you don't have to be. Friday, October 31, 2014. FireAndForget a Task with AggressiveInlining. When working with tasks you will get a warning if you do not use a task returned from a method. However, you might actually want to fire and forget that task. So what do you do? One option is to create an extension method for your task to mark it as fire and forget. Aside from removing the warning, it also gives you the nice ability to find all usages. Implementation and Unit Test.
tomdupont.net
Tom DuPont .NET: How To Capture Test Output in xUnit 2.0
http://www.tomdupont.net/2015/05/how-to-capture-test-output-in-xunit-20.html
Tom DuPont .NET. I'm a tool, so you don't have to be. Saturday, May 23, 2015. How To Capture Test Output in xUnit 2.0. As of xUnit 2.0 the test framework no longer captures any native outputs, this is by design. Now the question is: where do you write your test output? You now have to write all test output to an interface, ITestOutputHelper. Spoilers: My next blog post will be about how to combine this with Common.Logging. System.Threading.Tasks;. TestOutput = testOutput;. Await Task.Delay(1000);.
tomdupont.net
Tom DuPont .NET: August 2014
http://www.tomdupont.net/2014_08_01_archive.html
Tom DuPont .NET. I'm a tool, so you don't have to be. Sunday, August 31, 2014. Three steps to wire up your IOC container. How can you dynamically and flexibly wire up your inversion of control container? Here are three easy steps to consider:. First, use reflection to help wire up your boiler plate or dynamic dependencies. Second, explicitly register and customize any additional dependencies that your application needs Third, use configuration. Sunday, August 24, 2014. You can now filter by test name.
tomdupont.net
Tom DuPont .NET: Cascading AppSettings from Multiple Config Files
http://www.tomdupont.net/2015/07/cascading-appsettings-from-multiple.html
Tom DuPont .NET. I'm a tool, so you don't have to be. Saturday, July 25, 2015. Cascading AppSettings from Multiple Config Files. In my previous blog post I talked about creating complex configuration objects from AppSettings. I really like this practice, but it can cause your config files to grow pretty large. One solution is to break your app.config into multiple files using the SectionInformation.ConfigSource property. NameValueCollection { collection };. Value = subCollection[key];. Tom DuPont is a So...
tomdupont.net
Tom DuPont .NET: April 2015
http://www.tomdupont.net/2015_04_01_archive.html
Tom DuPont .NET. I'm a tool, so you don't have to be. Thursday, April 30, 2015. Persistent Cache Repository using SQLite. A while back I blogged about an ICacheRepository. I still really like that concept, although admittedly there a few updates that I should make to the implementation. What do you do if you need a persistent cache, but you don't have any of those document databases available? By which I mean SQLite. Would this stand up under load? Would I recommend that production systems use this?
tomdupont.net
Tom DuPont .NET: How To: Kill child process when parent process is killed
http://www.tomdupont.net/2015/06/how-to-kill-child-process-when-parent.html
Tom DuPont .NET. I'm a tool, so you don't have to be. Monday, June 22, 2015. How To: Kill child process when parent process is killed. UPDATE (2/15/2016): There is now a v2 of this class! Kill child process when parent process is killed. Working example of CreateJobObject/SetInformationJobObject pinvoke in .net? I took the liberty of cleaning up a few small things in the code and creating a demo:. IsChild = args.Length = 1 & Boolean.Parse(args[0]);. Console.WriteLine( "PARENT PROCESS". LastError = Marsha...
tomdupont.net
Tom DuPont .NET: June 2015
http://www.tomdupont.net/2015_06_01_archive.html
Tom DuPont .NET. I'm a tool, so you don't have to be. Sunday, June 28, 2015. NET Asynchronous Batch Processor. The NET Framework offers a series of Thread-Safe Collections. That allows you to consume collections across threads. Processing the contents of these collections still requires a thread, and while there is a BlockingCollection. What if you want to handle dynamically sized batches of data in an asynchronous manner? You could use a series of Dataflow. BatchProcessorBase T : IDisposable. Stay alive...
SOCIAL ENGAGEMENT