Esempio n. 1
0
 internal TypeDefImpl(ModuleReader module, int index)
 {
     this.module        = module;
     this.index         = index;
     this.typeName      = TypeNameParser.Escape(module.GetString(module.TypeDef.records[index].TypeName));
     this.typeNamespace = TypeNameParser.Escape(module.GetString(module.TypeDef.records[index].TypeNamespace));
 }
Esempio n. 2
0
 internal TypeBuilder(ITypeOwner owner, string name, Type baseType, TypeAttributes attribs)
 {
     this.owner          = owner;
     this.token          = this.ModuleBuilder.TypeDef.AllocToken();
     this.nameOrFullName = TypeNameParser.Escape(name);
     SetParent(baseType);
     this.attribs = attribs;
     if (!this.IsNested)
     {
         int lastdot = name.LastIndexOf('.');
         if (lastdot > 0)
         {
             this.typeNameSpace = this.ModuleBuilder.Strings.Add(name.Substring(0, lastdot));
             name = name.Substring(lastdot + 1);
         }
     }
     this.typeName = this.ModuleBuilder.Strings.Add(name);
 }