Ejemplo n.º 1
0
    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);
        }
    }
Ejemplo n.º 2
0
    public void Execute(List <TypeDefinition> classes)
    {
        foreach (var type in classes)
        {
        }

        foreach (var type in classes)
        {
            var baseType = implementsInterfaceFinder.HierarchyImplementsIStorable(type);
            if (baseType == null)
            {
                continue;
            }
            var checkMethod = loadedCheckerInjector.Execute(baseType);

            var typeProcessor = new TypeProcessor(logInfo, checkMethod, type);
            typeProcessor.Execute();
        }
    }