1.1 --- a/Hardware/PInvokeDelegateFactory.cs Tue Sep 21 10:33:28 2010 +0000
1.2 +++ b/Hardware/PInvokeDelegateFactory.cs Tue Sep 21 20:32:36 2010 +0000
1.3 @@ -43,19 +43,17 @@
1.4
1.5 namespace OpenHardwareMonitor.Hardware {
1.6
1.7 - internal sealed class PInvokeDelegateFactory {
1.8 + internal static class PInvokeDelegateFactory {
1.9
1.10 - private static ModuleBuilder moduleBuilder =
1.11 + private static readonly ModuleBuilder moduleBuilder =
1.12 AppDomain.CurrentDomain.DefineDynamicAssembly(
1.13 new AssemblyName("PInvokeDelegateFactoryInternalAssembly"),
1.14 AssemblyBuilderAccess.Run).DefineDynamicModule(
1.15 "PInvokeDelegateFactoryInternalModule");
1.16
1.17 - private static IDictionary<DllImportAttribute, Type> wrapperTypes =
1.18 + private static readonly IDictionary<DllImportAttribute, Type> wrapperTypes =
1.19 new Dictionary<DllImportAttribute, Type>();
1.20
1.21 - private PInvokeDelegateFactory() { }
1.22 -
1.23 public static void CreateDelegate<T>(DllImportAttribute dllImportAttribute,
1.24 out T newDelegate) where T : class
1.25 {