diff -r fbf22ccd9d6f -r 0ee888c485d5 Hardware/PInvokeDelegateFactory.cs --- a/Hardware/PInvokeDelegateFactory.cs Tue Sep 21 10:33:28 2010 +0000 +++ b/Hardware/PInvokeDelegateFactory.cs Tue Sep 21 20:32:36 2010 +0000 @@ -43,19 +43,17 @@ namespace OpenHardwareMonitor.Hardware { - internal sealed class PInvokeDelegateFactory { + internal static class PInvokeDelegateFactory { - private static ModuleBuilder moduleBuilder = + private static readonly ModuleBuilder moduleBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly( new AssemblyName("PInvokeDelegateFactoryInternalAssembly"), AssemblyBuilderAccess.Run).DefineDynamicModule( "PInvokeDelegateFactoryInternalModule"); - private static IDictionary wrapperTypes = + private static readonly IDictionary wrapperTypes = new Dictionary(); - private PInvokeDelegateFactory() { } - public static void CreateDelegate(DllImportAttribute dllImportAttribute, out T newDelegate) where T : class {