Пример #1
0
        public void createCirDataAnalysisObject()
        {
            var cirFactory = new CirFactory();
            cirDataAnalysis = cirFactory.createCirDataAnalysisObject(new List<String>
                                                           {
                                                               Assembly.GetExecutingAssembly().Location,
                                                               DI.config.ExecutingAssembly
                                                           });

            Assert.That(cirDataAnalysis != null, "cirDataAnalysis was null");
        }
Пример #2
0
 public static ICirClass toCir(this Type type)
 {
     var cirData = new CirData();
     var assemblyLocation = type.assemblyLocation();
     var assembly = CecilUtils.getAssembly(assemblyLocation);
     var cirFactory = new CirFactory();
     cirFactory.loadAndMapSymbols(assembly, assemblyLocation, false, "");
     var typeDefinition = CecilUtils.getType(assembly, type.Name);
     var cirType = cirFactory.processTypeDefinition(cirData, typeDefinition);
     cirData.remapXRefs();
     return cirType;
 }
Пример #3
0
 public void createCirDataObject()
 {
     var cirFactory = new CirFactory();
     ICirData cirData = new CirData();
     DI.log.info("using assembly:{0} and O2_Kernel.dll", Assembly.GetExecutingAssembly().Location);
     cirFactory.processAssemblyDefinition(cirData, Assembly.GetExecutingAssembly().Location);
     cirFactory.processAssemblyDefinition(cirData, DI.config.ExecutingAssembly);            
     Assert.That(cirData.dClasses_bySignature.Count > 0, "There were no classes in cirData object");
     Assert.That(cirData.dFunctions_bySignature.Count > 0, "There were no function in cirData object");
     O2Messages.setCirData(cirData);
     //CirFactoryUtils.showCirDataStats();
 }
Пример #4
0
        // use for mapping a single class
        public static ICirClass processType(Type type)
        {
            var cirData          = new CirData();
            var assemblyLocation = type.assemblyLocation();
            var assembly         = CecilUtils.getAssembly(assemblyLocation);
            var cirFactory       = new CirFactory();

            cirFactory.loadAndMapSymbols(assembly, assemblyLocation, false, "");
            var typeDefinition = CecilUtils.getType(assembly, type.Name);
            var cirClass       = cirFactory.processTypeDefinition(cirData, typeDefinition);

            cirFactory.mapTypeInterfaces(cirData, typeDefinition);
            cirData.remapXRefs();
            return(cirClass);
        }
 private void addMethodInfos(List<MethodInfo> methodInfos)
 {            
     var cirFunctions = new List<ICirFunction>();
     var cirDataAnalysis = new CirFactory().createCirDataAnalysisObject(methodInfos);
     addCirFunctions(cirDataAnalysis.dCirFunction_bySignature.Values.ToList());
                                  
 }