本文整理汇总了C#中ICSharpCode.ILSpy.AssemblyList.OpenAssembly方法的典型用法代码示例。如果您正苦于以下问题:C# AssemblyList.OpenAssembly方法的具体用法?C# AssemblyList.OpenAssembly怎么用?C# AssemblyList.OpenAssembly使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICSharpCode.ILSpy.AssemblyList
的用法示例。
在下文中一共展示了AssemblyList.OpenAssembly方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddToList
private void AddToList(AssemblyList list, string FullName)
{
AssemblyNameInfo reference = new AssemblyNameInfo(FullName);
string file = GacInterop.FindAssemblyInNetGac(reference);
if (file != null)
list.OpenAssembly(file);
}
示例2: MainWindow_Loaded
void MainWindow_Loaded(object sender, RoutedEventArgs e)
{
ILSpySettings spySettings = this.spySettings;
this.spySettings = null;
// Load AssemblyList only in Loaded event so that WPF is initialized before we start the CPU-heavy stuff.
// This makes the UI come up a bit faster.
this.assemblyList = assemblyListManager.LoadList(spySettings, sessionSettings.ActiveAssemblyList);
ShowAssemblyList(this.assemblyList);
string[] args = Environment.GetCommandLineArgs();
for (int i = 1; i < args.Length; i++) {
assemblyList.OpenAssembly(args[i]);
}
if (assemblyList.GetAssemblies().Length == 0)
LoadInitialAssemblies();
SharpTreeNode node = FindNodeByPath(sessionSettings.ActiveTreeViewPath, true);
if (node != null) {
SelectNode(node);
// only if not showing the about page, perform the update check:
ShowMessageIfUpdatesAvailableAsync(spySettings);
} else {
AboutPage.Display(decompilerTextView);
}
}
示例3: Main
//.........这里部分代码省略.........
}
if (appPath == null) {
Console.WriteLine ("directory/to/all/your/dll missing");
showUsage ();
return;
}
if (slnName == null && outLanguageType==LAN_TYPE_CSHARP) {
Console.WriteLine ("Solution Name missing");
showUsage ();
return;
}
Console.WriteLine ("Decompiling all dll in " + appPath);
Console.WriteLine ("Please wait...");
DirectoryInfo di = new DirectoryInfo(appPath);
appPath = di.FullName;
FileInfo[] dllFileInfoList = di.GetFiles("*.dll");
FileInfo[] exeFileInfoList = di.GetFiles ("*.exe");
AssemblyList asmlist = new AssemblyList ("mylistname");
foreach (var dllfile in dllFileInfoList)
{
bool bDecompile = isDecompilingFile (dllfile.FullName, onlyDecompilingFileNameList);
asmlist.OpenAssembly (dllfile.FullName,!bDecompile);
}
foreach (var dllfile in exeFileInfoList)
{
bool bDecompile = isDecompilingFile (dllfile.FullName, onlyDecompilingFileNameList);
asmlist.OpenAssembly (dllfile.FullName,!bDecompile);
}
if (libPath != null) {
di = new DirectoryInfo(libPath);
libPath = di.FullName;
dllFileInfoList = di.GetFiles("*.dll");
foreach (var dllfile in dllFileInfoList) {
asmlist.OpenAssembly (dllfile.FullName,true);
}
}
StringBuilder projSln = new StringBuilder ();
projSln.Append ("Microsoft Visual Studio Solution File, Format Version 11.00\n# Visual Studio 2010\n");
StringBuilder globSec = new StringBuilder ();
Guid slnProjGuid = Guid.NewGuid();
int num = 0;
LoadedAssembly [] ls = asmlist.GetAssemblies ();
var decompilationOptions = new DecompilationOptions ();
decompilationOptions.FullDecompilation = true;
decompilationOptions.assenmlyList = asmlist;
示例4: AddToList
private void AddToList(AssemblyList list, string FullName)
{
AssemblyNameReference reference = AssemblyNameReference.Parse(FullName);
string file = GacInterop.FindAssemblyInNetGacOrWinMetadata(reference);
if (file != null)
list.OpenAssembly(file);
}