2 using System.Collections.Generic;
10 public static partial class Extensions {
12 public static bool TryGetLinkedAssembly (this LinkContext context, string name, out AssemblyDefinition assembly)
14 assembly = GetAssembly (context, name);
18 return context.Annotations.GetAction (assembly) == AssemblyAction.Link;
21 public static AssemblyDefinition GetAssembly (this LinkContext context, string assembly_name)
23 foreach (var assembly in context.GetAssemblies ())
24 if (assembly.Name.Name == assembly_name)
30 // note: direct check, no inheritance
31 public static bool Is (this TypeReference type, string @namespace, string name)
33 return ((type != null) && (type.Name == name) && (type.Namespace == @namespace));