public void loadAssembly(string assemblyToLoad)
        {
            log.debug("Loading assembly {0}", assemblyToLoad);
            var assemblyDefinition = CecilUtils.getAssembly(assemblyToLoad);

            loadAssembly(assemblyDefinition);
        }
Exemple #2
0
        public void applySourceCodeLicense()
        {
            var targetFiles  = getTargetFiles(foldersToApplyLicense);
            var filesChanged = 0;

            foreach (var file in targetFiles)
            {
                var lines = Files.getFileLines(file);
                if (lines.Count > 0)
                {
                    if (lines[0] != sourceCodeLicense)
                    {
                        lines.Insert(0, sourceCodeLicense);
                        Files.saveAsFile_StringList(file, lines);
                        filesChanged++;
                    }
                }
            }
            log.debug("in applySourceCodeLicense: There are {0} files modifed", filesChanged);
        }
        private static KReflection reflection = new KReflection();         //PublicDI.reflection;

        public static void openAscxInNewWindow()
        {
            var executeWizards = O2Gui.showAsForm <ascx_AssemblyAttributes>("View Assembly Attributes", 400, 400);

            var targetFile = PublicDI.config.CurrentExecutableDirectory.pathCombine("FluentSharp.CoreLib.dll");

            if (targetFile.fileExists())
            {
                log.debug("File exists: {0}", targetFile);
                executeWizards.loadAssembly(targetFile);
            }
        }
 public static string showWebXml(List <String> files)
 {
     if (files != null)
     {
         log.debug("There are  files available: {0}", files.Count.ToString());
         foreach (var file in files)
         {
             if (Path.GetFileName(file) == "web.xml")
             {
                 showWebXml(file);
                 break;
             }
         }
     }
     else
     {
         log.error("files was null");
     }
     return("all done...");
 }
 public string checkIfTargetExists()
 {
     Assert.That(File.Exists(scriptToInstrument));
     log.debug("File Exists: {0}", scriptToInstrument);
     return(scriptToInstrument);
 }
 public static string testStaticExecution(string filename)
 {
     log.debug("File Exists: {0}", filename);
     log.showMessageBox("test");
     return("target file exists: " + filename);
 }