Execute() public method

public Execute ( ) : void
return void
コード例 #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);
        }
    }
コード例 #2
0
ファイル: ModuleWeaver.cs プロジェクト: Fody/Fielder
    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();
    }
コード例 #3
0
    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();
    }
コード例 #4
0
ファイル: ModuleWeaver.cs プロジェクト: modulexcite/Fielder
    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();
    }
コード例 #5
0
ファイル: ModuleWeaver.cs プロジェクト: anthrax3/Fielder
    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();
    }
コード例 #6
0
        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);
            }
        }