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 msCoreReferenceFinder = new MsCoreReferenceFinder(this, ModuleDefinition.AssemblyResolver); msCoreReferenceFinder.Execute(); var allTypes = ModuleDefinition.GetTypes().ToList(); var fieldToPropertyFinder = new MethodFinder(allTypes); fieldToPropertyFinder.Execute(); var fieldToPropertyConverter = new FieldToPropertyConverter(this, msCoreReferenceFinder, ModuleDefinition.TypeSystem, allTypes); fieldToPropertyConverter.Execute(); var fieldToPropertyForwarder = new FieldToPropertyForwarder(this, fieldToPropertyConverter, msCoreReferenceFinder, fieldToPropertyFinder); fieldToPropertyForwarder.Execute(); }
public override void Execute() { var msCoreReferenceFinder = new MsCoreReferenceFinder(this, ModuleDefinition.AssemblyResolver); msCoreReferenceFinder.Execute(); var allPocoTypes = ModuleDefinition.GetTypes().ToList(); var finder = new MethodFinder(allPocoTypes); finder.Execute(); var converter = new ImplementITrackableInjector(this, msCoreReferenceFinder, ModuleDefinition.TypeSystem, allPocoTypes); converter.Execute(); }
public override void Execute() { var referenceFinder = new ReferenceFinder(ModuleDefinition, FindType); referenceFinder.Execute(); var allTypes = ModuleDefinition.GetTypes().ToList(); var finder = new MethodFinder(allTypes); finder.Execute(); var converter = new FieldToPropertyConverter(this, referenceFinder, ModuleDefinition.TypeSystem, allTypes); converter.Execute(); var forwarder = new FieldToPropertyForwarder(this, converter, referenceFinder, finder); forwarder.Execute(); }
public void Execute() { typeResolver = new TypeResolver(); var bindableBaseTypeFinder = new TypeFinder(ModuleDefinition, AssemblyResolver, BINDABLE_BASE); bindableBaseType = bindableBaseTypeFinder.Execute(); // Find the ConnectChild () method var connectFinder = new MethodFinder(ModuleDefinition, CONNECT, 3); connectMethod = connectFinder.Execute(bindableBaseType); // Get a list of all the classes deriving from BindableBase bindableTypes = new HashSet <TypeDefinition> ( ModuleDefinition.GetTypes().Where(x => x.IsClass && IsBindableBaseType(x))); // Process BindableBase types to inject the ConnectChild () function foreach (var type in bindableTypes) { ProcessType(type); } }