本文整理汇总了C#中System.Reflection.Assembly.Select方法的典型用法代码示例。如果您正苦于以下问题:C# Assembly.Select方法的具体用法?C# Assembly.Select怎么用?C# Assembly.Select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Reflection.Assembly
的用法示例。
在下文中一共展示了Assembly.Select方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadPluginTypes
public static Type[] LoadPluginTypes(Assembly[] assemblies)
{
if (_logger.IsDebugEnabled)
{
_logger.Debug("Loading assemblies: {0}", String.Join(",", assemblies.Select(a => a.FullName)));
}
return assemblies.Select(assembly => assembly.GetCustomAttribute<AssemblyPluginDescriptorAttribute>()).Select(attr => attr.PluginType).ToArray();
}
示例2: WebPartsCatalog
/// <summary>
/// Initializes a new instance of the <see cref="WebPartsCatalog" /> class. Overloaded constructor allows caller to specify one or more assemblies and
/// optionally MEF conventions for finding parts.
/// </summary>
/// <param name="assemblies">The assemblies.</param>
/// <param name="reflectionContext">The reflection context.</param>
public WebPartsCatalog(Assembly[] assemblies, ReflectionContext reflectionContext = null)
{
if (reflectionContext == null)
reflectionContext = GetWebPartConventions();
catalog = new AggregateCatalog(assemblies.Select(a => new AssemblyCatalog(a, reflectionContext)));
}
示例3: ResourceResolveException
private static Exception ResourceResolveException(string resourceFileName, Assembly callingAssembly, Assembly[] referencedAssemblies, Caller caller)
{
var referencedAssembliesNames = string.Join(", ", referencedAssemblies.Select(a => a.GetName().Name));
var message = string.Format("Can't locate resource '{0}' in assembly '{1}' and it's referenced assemblies. Please, make sure resource file exists and is build as Embedded Resource.\r\n\r\n Resource resolution priority:\r\n1. First place where resource is supposed to be is in assembly '{1}' in '{2}' folder or in any of it's parent folders.\r\n2. Resolution proceeds in all referenced assemblies: {3}",
resourceFileName, callingAssembly.GetName().Name, caller.GerNamespace(), referencedAssembliesNames);
return new ResourceResolveException(message);
}
示例4: DkmClrRuntimeInstance
internal DkmClrRuntimeInstance(
Assembly[] assemblies,
GetModuleDelegate getModule = null,
GetMemberValueDelegate getMemberValue = null)
{
if (getModule == null)
{
getModule = (r, a) => new DkmClrModuleInstance(r, a, (a != null) ? new DkmModule(a.GetName().Name + ".dll") : null);
}
this.Assemblies = assemblies;
this.Modules = assemblies.Select(a => getModule(this, a)).Where(m => m != null).ToArray();
_defaultModule = getModule(this, null);
_appDomain = new DkmClrAppDomain(this);
_getMemberValue = getMemberValue;
}
示例5: MergeStaticProxyFactoryWithProxies
protected virtual void MergeStaticProxyFactoryWithProxies(Assembly staticProxyAssembly, Assembly proxyAssembly, Assembly[] referenceAssemblies, string outputPath)
{
foreach (var referenceAssembly in referenceAssemblies)
{
Console.WriteLine(referenceAssembly);
}
var merger = new ILRepack();
var searchDirectories = referenceAssemblies.Select(a => Path.GetDirectoryName(a.Location))
.Distinct()
.ToArray();
merger.SetSearchDirectories(searchDirectories);
merger.SetInputAssemblies(new[] {staticProxyAssembly.Location, proxyAssembly.Location});
merger.OutputFile = outputPath;
merger.Merge();
}