public void Execute() { var freezableTypeFinder = new FreezableTypeFinder(ModuleDefinition, AssemblyResolver); freezableTypeFinder.Execute(); var exceptionFinder = new ExceptionFinder(ModuleDefinition, AssemblyResolver); exceptionFinder.Execute(); var volatileFinder = new VolatileTypeFinder(ModuleDefinition, AssemblyResolver); volatileFinder.Execute(); var volatileFieldFixer = new VolatileFieldFixer(volatileFinder); var fieldInjector = new FieldInjector(volatileFinder, ModuleDefinition.TypeSystem, volatileFieldFixer); var checkIsFrozenBuilder = new CheckIsFrozenBuilder(ModuleDefinition.TypeSystem, exceptionFinder); var freezeCheckerInjector = new FreezeCheckerInjector(ModuleDefinition, fieldInjector, checkIsFrozenBuilder); var typeResolver = new TypeResolver(); var implementsInterfaceFinder = new ImplementsInterfaceFinder(typeResolver); var classes = ModuleDefinition.GetTypes() .Where(x => x.IsClass) .ToList(); var assemblyProcessor = new AssemblyProcessor(freezeCheckerInjector, implementsInterfaceFinder, LogInfo); assemblyProcessor.Execute(classes); volatileFieldFixer.Execute(classes); }
public void Execute() { var storableTypeFinder = new TypeFinder(ModuleDefinition, AssemblyResolver, ISTORABLE); storableTypeFinder.Execute(); var checkLoadedInjector = new MethodFinder(ModuleDefinition, CHECK_IS_LOADED, 0); var typeResolver = new TypeResolver(); var implementsInterfaceFinder = new ImplementsInterfaceFinder(typeResolver); var classes = ModuleDefinition.GetTypes() .Where(x => x.IsClass) .ToList(); foreach (var type in classes) { var baseType = implementsInterfaceFinder.HierarchyImplementsIStorable(type); if (baseType == null) { continue; } var checkMethod = checkLoadedInjector.Execute(baseType); ProcessType(type, checkMethod); } }
public void Execute() { var freezableTypeFinder = new FreezableTypeFinder(ModuleDefinition, AssemblyResolver); freezableTypeFinder.Execute(); var exceptionFinder = new ExceptionFinder(ModuleDefinition, AssemblyResolver); exceptionFinder.Execute(); var volatileFinder = new VolatileTypeFinder(ModuleDefinition, AssemblyResolver); volatileFinder.Execute(); var volatileFieldFixer = new VolatileFieldFixer(volatileFinder); var fieldInjector = new FieldInjector(volatileFinder, ModuleDefinition.TypeSystem, volatileFieldFixer); var checkIsFrozenBuilder = new CheckIsFrozenBuilder(ModuleDefinition.TypeSystem, exceptionFinder); var freezeCheckerInjector = new FreezeCheckerInjector(ModuleDefinition, fieldInjector, checkIsFrozenBuilder); var typeResolver = new TypeResolver(); var implementsInterfaceFinder = new ImplementsInterfaceFinder(typeResolver); var classes = ModuleDefinition.GetTypes() .Where(x => x.IsClass) .ToList(); var assemblyProcessor = new AssemblyProcessor(freezeCheckerInjector, implementsInterfaceFinder, LogInfo); assemblyProcessor.Execute(classes); volatileFieldFixer.Execute(classes); }
public AssemblyProcessor(FreezeCheckerInjector freezeCheckerInjector, ImplementsInterfaceFinder implementsInterfaceFinder, Action <string> logInfo) { this.freezeCheckerInjector = freezeCheckerInjector; this.implementsInterfaceFinder = implementsInterfaceFinder; this.logInfo = logInfo; }
public AssemblyProcessor(MethodInjector loadedCheckerInjector, ImplementsInterfaceFinder implementsInterfaceFinder, Action <string> logInfo) { this.loadedCheckerInjector = loadedCheckerInjector; this.implementsInterfaceFinder = implementsInterfaceFinder; this.logInfo = logInfo; }
public AssemblyProcessor(FreezeCheckerInjector freezeCheckerInjector, ImplementsInterfaceFinder implementsInterfaceFinder, Action<string> logInfo) { this.freezeCheckerInjector = freezeCheckerInjector; this.implementsInterfaceFinder = implementsInterfaceFinder; this.logInfo = logInfo; }