示例#1
0
 public IUnit LoadUnit(UnitIdentity unitIdentity) {
   throw new NotImplementedException();
 }
示例#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);
 }
示例#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);
   }
 }
示例#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;
 }
示例#6
0
 IUnit IMetadataHost.LoadUnit(UnitIdentity unitIdentity)
 {
     throw new NotImplementedException();
 }
示例#7
0
 public IUnit LoadUnit(UnitIdentity unitIdentity)
 {
     Contract.Requires(unitIdentity != null);
     Contract.Ensures(Contract.Result <IUnit>() != null);
     throw new NotImplementedException();
 }
示例#8
0
 public RewriteUnitReferences(IMetadataHost host, Module sourceUnit)
   : base(host) {
   this.sourceUnitIdentity = sourceUnit.UnitIdentity;
   }