Exemplo n.º 1
0
        /// <summary>
        /// Initialize <see cref="TypeServices" /> object that provides services from TypeSystem to given owner.
        /// </summary>
        /// <param name="owner">Owner which uses current <see cref="TypeServices" />.</param>
        /// <param name="manager">Representation of AppDomain where assemblies are stored.</param>
        internal TypeServices(AssemblyProvider owner, AssembliesManager manager)
        {
            _owner   = owner;
            _manager = manager;

            //every assembly has to have runtime as prioritized reference
            //note that adding Runtime reference to itself is not a problem
            References.Add(Settings.Runtime);
            //assembly used for resolving is also owner itself
            References.Add(owner.Key);
        }
Exemplo n.º 2
0
 internal TypeAssembly(AssembliesManager manager, AssemblyProvider assembly)
 {
     _manager = manager;
     Assembly = assembly;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Unload whole assembly from type system because of invalidation.
 /// </summary>
 /// <param name="provider">Representation of invalidate assembly.</param>
 internal void InvalidateAssembly(AssemblyProvider provider)
 {
     _manager.InvalidateAssembly(provider);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Get components defined within given assembly.
 /// </summary>
 /// <param name="assembly">Assembly where components are searched.</param>
 /// <returns>Components defined within assembly.</returns>
 public IEnumerable <ComponentInfo> GetComponents(AssemblyProvider assembly)
 {
     return(_manager.GetComponents(assembly));
 }