本文整理匯總了C#中Mono.Cecil.AssemblyDefinition.BuildNamespaceHierarchyTree方法的典型用法代碼示例。如果您正苦於以下問題:C# AssemblyDefinition.BuildNamespaceHierarchyTree方法的具體用法?C# AssemblyDefinition.BuildNamespaceHierarchyTree怎麽用?C# AssemblyDefinition.BuildNamespaceHierarchyTree使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Mono.Cecil.AssemblyDefinition
的用法示例。
在下文中一共展示了AssemblyDefinition.BuildNamespaceHierarchyTree方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: MSBuildProjectBuilder
public const int MaxPathLength = 259; // 259 + NULL == 260
public MSBuildProjectBuilder(string assemblyPath, AssemblyDefinition assembly,
Dictionary<ModuleDefinition, Mono.Collections.Generic.Collection<TypeDefinition>> userDefinedTypes,
Dictionary<ModuleDefinition, Mono.Collections.Generic.Collection<Resource>> resources,
string targetPath, ILanguage language, IFrameworkResolver frameworkResolver,
IDecompilationPreferences preferences, IAssemblyInfoService assemblyInfoService,
VisualStudioVersion visualStudioVersion = VisualStudioVersion.VS2010, ProjectGenerationSettings projectGenerationSettings = null,
IProjectGenerationNotifier projectNotifier = null)
{
this.assemblyPath = assemblyPath;
this.assembly = assembly;
this.userDefinedTypes = userDefinedTypes;
this.resources = resources;
this.TargetPath = targetPath;
this.targetDir = Path.GetDirectoryName(targetPath);
this.language = language;
this.frameworkResolver = frameworkResolver;
this.assemblyInfoService = assemblyInfoService;
this.visualStudioVersion = visualStudioVersion;
this.projectGenerationSettings = projectGenerationSettings;
this.currentAssemblyResolver = assembly.MainModule.AssemblyResolver;
this.decompilationPreferences = preferences;
platform = currentAssemblyResolver.GetTargetPlatform(assembly.MainModule.FilePath);
namespaceHierarchyTree = assembly.BuildNamespaceHierarchyTree();
filePathsService =
new DefaultFilePathsService(
this.assembly,
this.assemblyPath,
Path.GetFileName(this.TargetPath),
this.UserDefinedTypes,
this.Resources,
namespaceHierarchyTree,
this.language,
Utilities.GetMaxRelativePathLength(targetPath));
this.modulesToProjectsFilePathsMap = this.filePathsService.GetModulesToProjectsFilePathsMap();
this.resourcesToPathsMap = this.filePathsService.GetResourcesToFilePathsMap();
this.xamlResourcesToPathsMap = this.filePathsService.GetXamlResourcesToFilePathsMap();
this.assemblyInfo = GetAssemblyInfo();
this.projectNotifier = projectNotifier;
}