private IType FindInAssembly(TypeReference typeRef, IAssembly assembly) { var qualName = NameConversion.ParseSimpleName(typeRef.Name) .Qualify(NameConversion.ParseNamespace(typeRef.Namespace)); return(PickSingleResolvedType( typeRef, GetTypeResolver(assembly).ResolveTypes(qualName))); }
/// <summary> /// Creates a Flame type that wraps a particular type /// definition. /// </summary> /// <param name="definition">The definition to wrap.</param> /// <param name="assembly"> /// The assembly that directly defines this type. /// </param> public ClrTypeDefinition( TypeDefinition definition, ClrAssembly assembly) : this( definition, assembly, new TypeParent(assembly), NameConversion .ParseSimpleName(definition.Name) .Qualify( NameConversion.ParseNamespace( definition.Namespace))) { }