Microsoft.Cci.InternFactory.GetModuleStore C# (CSharp) Méthode

GetModuleStore() private méthode

private GetModuleStore ( ModuleIdentity moduleIdentity ) : ModuleStore
moduleIdentity ModuleIdentity
Résultat ModuleStore
    ModuleStore GetModuleStore(ModuleIdentity moduleIdentity) {
      Contract.Requires(moduleIdentity != null);
      Contract.Ensures(Contract.Result<ModuleStore>() != null);

      IName moduleName = moduleIdentity.Name;
      foreach (ModuleStore mStore in this.ModuleHashtable.GetValuesFor((uint)moduleName.UniqueKey)) {
        if (moduleIdentity.Equals(mStore.ModuleIdentitity)) return mStore;
      }
      uint value;
      if (moduleIdentity.ContainingAssembly != null) {
        AssemblyStore assemblyStore = this.GetAssemblyStore(moduleIdentity.ContainingAssembly);
        assemblyStore.InternedIdWithCount++;
        value = assemblyStore.InternedIdWithCount;
      } else {
        value = this.CurrentModuleInternValue++;
      }
      ModuleStore mStore1 = new ModuleStore(moduleIdentity, value, this.CurrentNamespaceInternValue++);
      this.ModuleHashtable.Add((uint)moduleName.UniqueKey, mStore1);
      return mStore1;
    }