Base class for all Meta Data table elements
Inheritance: IComparable
示例#1
0
文件: PEAPI.cs 项目: Profit0004/mono
		public void AddCustomAttribute (Method meth, Constant constant, MetaDataElement element)
		{
			metaData.AddCustomAttribute (new CustomAttribute (element, meth, constant));
			element.HasCustomAttr = true;
		}
		internal DeclSecurity(MetaDataElement paren, ushort act, byte [] val)        
			: base (paren, act)
		{
			byteVal = val;
		}
		internal FieldMarshal(MetaDataElement field, NativeType nType)      
		{
			this.field = field;
			this.nt = nType;
			tabIx = MDTable.FieldMarshal;
		}
		internal BaseDeclSecurity(MetaDataElement paren, ushort act)
		{
			parent = paren;
			action = act;
			tabIx = MDTable.DeclSecurity;
		}
		internal void SetEntryPoint(MetaDataElement ep) 
		{
			entryPoint = ep;
		}
		internal ConstantElem(MetaDataElement parent, Constant val) 
		{
			this.parent = parent;
			cValue = val;
			tabIx = MDTable.Constant;
			sortTable = true;
		}
		internal CustomAttribute(MetaDataElement paren, Method constrType, 
				Constant val) {
			parent = paren;
			type = constrType;
			cVal = val;
			tabIx = MDTable.CustomAttribute;
		}
示例#8
0
 internal ManifestResource (ManifestResource mres) {
   mrName = mres.mrName;
   flags = mres.flags;
   this.rRef = rRef;
   this.fileOffset = fileOffset;
   this.resourceBytes = resourceBytes;
 }
示例#9
0
 public void AddCustomAttribute (Method meth, byte [] data, MetaDataElement element)
 {
         metaData.AddCustomAttribute (new CustomAttribute (element, meth, data));
 }
示例#10
0
           internal DeclSecurity(MetaDataElement paren, ushort act)        {
 parent = paren;
 action = act;
 tabIx = MDTable.DeclSecurity;
 throw(new NotYetImplementedException("Security "));
           }
示例#11
0
 internal void WriteCodedIndex(CIx code, MetaDataElement elem) {
   metaData.WriteCodedIndex(code,elem,this);
 }
示例#12
0
		internal ExternClassRef(TypeAttr attrs, string nsName, string name,
				MetaDataElement declRef, MetaData md) : base(nsName,name,md) 
		{
			externClass = new ExternClass(attrs,nameSpaceIx,nameIx,declRef);
			metaData.AddToTable(MDTable.ExportedType,externClass);
		}
示例#13
0
		public void AddDeclSecurity (SecurityAction sec_action, PEAPI.PermissionSet ps, MetaDataElement element)
		{
			metaData.AddDeclSecurity (new DeclSecurity_20 (element, (ushort) sec_action, ps));
		}
示例#14
0
		public void AddDeclSecurity (SecurityAction sec_action, byte [] data, MetaDataElement element)
		{
			metaData.AddDeclSecurity (new DeclSecurity (element, (ushort) sec_action, data));
		}
示例#15
0
		internal ExternClass(TypeAttr attr, uint nsIx, uint nIx, 
				MetaDataElement paren) : base(nsIx,nIx) 
		{
			flags = (uint)attr;
			parent = paren;
			tabIx = MDTable.ExportedType;
		}
示例#16
0
文件: Code.cs 项目: REALTOBIZ/mono
		public Catch(Type except, CILLabel handlerStart, CILLabel handlerEnd)
			: base(handlerStart,handlerEnd) 
		{
			exceptType = except;
		}
示例#17
0
		internal FieldRef(MetaDataElement paren, string name, Type fType) : base(name, fType)   
		{
			parent = paren;
		}
示例#18
0
文件: Code.cs 项目: REALTOBIZ/mono
		internal void ResolveType (MetaData md)
		{
		       exceptType = ((Type) exceptType).GetTypeSpec (md);
		}
示例#19
0
		internal MethodRef(MetaDataElement paren, string name, Type retType,
				Type[] pars, bool varArgMeth, Type[] optPars, int gen_param_count) : base(name)
		{
			parent = paren;
			parList = pars;
			this.retType = retType;
			if (parList != null) numPars = (uint)parList.Length;
			if (varArgMeth) {
				optParList = optPars;
				if (optParList != null) numOptPars = (uint)optParList.Length;
				callConv = CallConv.Vararg;
			}
			this.gen_param_count = gen_param_count;
		}
示例#20
0
文件: Code.cs 项目: REALTOBIZ/mono
		internal TypeInstr(int inst, Type aType, MetaData md) : base(inst) 
		{
			theType = aType.GetTypeSpec(md);
			size += 4;
		}
示例#21
0
		internal CustomAttribute(MetaDataElement paren, Method constrType,
				byte[] val) {
			parent = paren;
			type = constrType;
			tabIx = MDTable.CustomAttribute;
			byteVal = val;
		}
示例#22
0
		public ManifestResource(string name, uint flags, FileRef fileRef) 
		{
			InitResource (name, flags);
			rRef = fileRef;
		}
示例#23
0
		internal void AddToTable(MDTable tableIx, MetaDataElement elem) 
		{
			if (elem.Row > 0) {
				// Console.Out.WriteLine("ERROR - element already in table " + tableIx);
				return;
			}
			// updates Row field of the element
			// Console.WriteLine("Adding element to table " + (uint)tableIx);
			ArrayList table = GetTable(tableIx);
			elem.Row = (uint)table.Count + 1;
			table.Add(elem);
		}
示例#24
0
		public ManifestResource(string name, uint flags, FileRef fileRef, 
				uint fileIx) {
			InitResource (name, flags);
			rRef = fileRef;
			fileOffset = fileIx;
		}
示例#25
0
		internal void WriteCodedIndex(CIx code, MetaDataElement elem, FileImage output) 
		{
			uint ix = 0;
			if (elem != null) { 
				ix = (elem.Row << CIxShiftMap[(uint)code]) | elem.GetCodedIx(code);
				// Console.WriteLine("coded index = " + ix + " row = " + elem.Row);
				//} else {
				// Console.WriteLine("elem for coded index is null");
			}
			if (lgeCIx[(uint)code]) 
				output.Write(ix);
			else
				output.Write((ushort)ix);
		}
示例#26
0
		public ManifestResource(string name, uint flags, AssemblyRef assemRef) 
		{
			InitResource (name, flags);
			rRef = assemRef;
		}
示例#27
0
		internal DeclSecurity_20 (MetaDataElement paren, ushort act, PermissionSet ps)
			: base (paren, act)
		{
                        this.ps = ps;
		}
示例#28
0
		internal ManifestResource (ManifestResource mres) 
		{
			mrName = mres.mrName;
			flags = mres.flags;
			rRef = mres.rRef;
			fileOffset = mres.fileOffset;
			resourceBytes = mres.resourceBytes;
		}
示例#29
0
		private GenericParameter (MetaDataElement owner, MetaData metadata,
				short index, string name, GenericParamAttributes attr, bool nadda) {
			this.owner = owner;
			this.metadata = metadata;
			this.index = index;
			tabIx = MDTable.GenericParam;
			this.name = name;
			this.attr = attr;
		}
示例#30
0
文件: PEAPI.cs 项目: Profit0004/mono
		public ClassRef AddExternClass(string ns, string name, TypeAttr attrs, MetaDataElement declRef)
		{
			return new ExternClassRef (attrs, ns, name, declRef, metaData);
		}