All the blog posts I have written
ASP.NET MVC 3 Beta integration for AutofacPublished:5 min read
The Autofac MVC integration has been updated to provide integration with the ASP.NET MVC 3 Beta, making it easier for users by removing the need to add a reference to the Autofac.Integration.Web.dll assembly, implement the IContainerProviderAccessor interface on the HttpApplication, and register the ContainerDisposalModule in the web.config file. The core piece of the integration is the AutofacDependencyResolver which is an implementation of the IDependencyResolver interface that Brad Wilson outlines in his blog post series on ASP.NET MVC 3 Service Location. A HTTP module called RequestLifetimeModule is registered programmatically via the DynamicModuleUtility class to inform Autofac when the HTTP request has ended.
Random links for September 2010Published:5 min read
This article contains a list of interesting links from September 2010.
Getting the Windows Product ID using WMIPublished:2 min read
The Windows Product ID can be retrieved using WMI via the Win32_OperatingSystem class and the SerialNumber property. The relevant documentation can be found on MSDN and an example of code to query the property value is given. It has been tested successfully on various versions of Windows.
CodeDomProvider and Compiler Warning LevelsPublished:3 min read
By default, the CodeDomProvider does not return warning messages in the CompilerResults that are returned when compiling code in Visual Studio. The default warning level is 4, and you can use CompilerParameters.WarningLevel to set the warning level and CompilerParameters.TreatWarningsAsErrors to abort the compilation for warnings.
Random links for August 2010Published:12 min read
This article contains a list of interesting links from August 2010.
Random links for July 2010Published:4 min read
This article contains a list of interesting links from July 2010.
Attaching the Debugger only in DebugPublished:2 min read
This article discusses how to use the ConditionalAttribute to create a helper class that includes methods that should only be called when the DEBUG symbol is defined. This way, when you compile with the RELEASE symbol defined all calls to the methods will simply be excluded from the generated MSIL.
Fault Contract support in WSCF.bluePublished:4 min read
WSCF.blue has implemented support for fault contracts, allowing users to define fault messages in their WSDL using the WSDL Wizard. This feature was introduced with a new V1.0.9 update release on CodePlex.
Introducing Action Injection with Autofac ASP.NET MVC IntegrationPublished:7 min read
Autofac ASP.NET MVC Integration has introduced a new approach to dependency injection called Action Injection, which allows dependencies to be injected into action methods instead of the controller's constructor. This makes it easier to provide mock implementations for unit testing and reduces the number of mocks required.
Making Self-Hosting with Autofac WCF Integration easierPublished:2 min read
This article explains how to use the Autofac WCF integration to make self-hosting WCF services easier. It provides code to extend ServiceHost with a new method called AddDependencyInjectionBehavior which takes an IContainer instance as an argument. This makes the code more concise and eliminates the need to write a separate helper method.