Exemple #1
0
 public IUnit LoadUnit(UnitIdentity unitIdentity) {
   throw new NotImplementedException();
 }
Exemple #2
0
 /// <summary>
 /// The unit that matches the given identity, or a dummy unit if no matching unit can be found.
 /// </summary>
 public IUnit LoadUnit(UnitIdentity unitIdentity) {
   AssemblyIdentity/*?*/ assemblyIdentity = unitIdentity as AssemblyIdentity;
   if (assemblyIdentity != null) return this.LoadAssembly(assemblyIdentity);
   ModuleIdentity/*?*/ moduleIdentity = unitIdentity as ModuleIdentity;
   if (moduleIdentity != null) return this.LoadModule(moduleIdentity);
   return this.LoadUnitFrom(unitIdentity.Location);
 }
Exemple #3
0
 /// <summary>
 /// Removes the unit with the given identity.
 /// Returns true iff the unitIdentity is found in the loaded units.
 /// </summary>
 public bool RemoveUnit(UnitIdentity unitIdentity) {
   lock (GlobalLock.LockingObject) {
     return this.unitCache.Remove(unitIdentity);
   }
 }
Exemple #4
0
 /// <summary>
 /// Finds the unit that matches the given identifier, or a dummy unit if no matching unit can be found.
 /// </summary>
 public IUnit FindUnit(UnitIdentity unitIdentity) {
   IUnit/*?*/ unit;
   lock (GlobalLock.LockingObject) {
     this.unitCache.TryGetValue(unitIdentity, out unit);
   }
   if (unit != null)
     return unit;
   return Dummy.Unit;
 }
 public IUnit LoadUnit(UnitIdentity unitIdentity) {
   return Dummy.Unit;
 }
 IUnit IMetadataHost.LoadUnit(UnitIdentity unitIdentity)
 {
     throw new NotImplementedException();
 }
Exemple #7
0
 public IUnit LoadUnit(UnitIdentity unitIdentity)
 {
     Contract.Requires(unitIdentity != null);
     Contract.Ensures(Contract.Result <IUnit>() != null);
     throw new NotImplementedException();
 }
 public RewriteUnitReferences(IMetadataHost host, Module sourceUnit)
   : base(host) {
   this.sourceUnitIdentity = sourceUnit.UnitIdentity;
   }