本文整理汇总了C#中IAssemblyResolver.GetTargetPlatform方法的典型用法代码示例。如果您正苦于以下问题:C# IAssemblyResolver.GetTargetPlatform方法的具体用法?C# IAssemblyResolver.GetTargetPlatform怎么用?C# IAssemblyResolver.GetTargetPlatform使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IAssemblyResolver
的用法示例。
在下文中一共展示了IAssemblyResolver.GetTargetPlatform方法的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;
}