SetEntryPoint() private method

private SetEntryPoint ( MetaDataElement ep ) : void
ep MetaDataElement
return void
Esempio n. 1
0
		internal FileRef(uint nameIx, byte[] hashBytes, bool metaData,
				bool entryPoint, MetaData md) {
			if (!metaData) flags = NoMetaData;
			if (entryPoint) md.SetEntryPoint(this);
			this.nameIx = nameIx;
			hashIx = md.AddToBlobHeap(hashBytes);
			tabIx = MDTable.File;
		}
Esempio n. 2
0
		internal sealed override void BuildTables(MetaData md) 
		{
			if (done) return;
			if (pinvokeImpl != null) {
				md.AddToTable(MDTable.ImplMap,pinvokeImpl);
				pinvokeImpl.BuildTables(md);
			}
			if (entryPoint) md.SetEntryPoint(this);
			uint locToken = 0;
			if (locals != null) {
				localSig = new LocalSig(locals);
				md.AddToTable(MDTable.StandAloneSig,localSig);
				localSig.BuildTables(md);
				locToken = localSig.Token();
			}
			if (code != null) {
				code.CheckCode(locToken,initLocals,maxStack);
				textOffset = md.AddCode(code);
			}
			nameIx = md.AddToStringsHeap(name);
			sigIx = GetSigIx(md);
			parIx = md.TableIndex(MDTable.Param);
			if (ret_param.HasMarshalInfo || ret_param.HasCustomAttr) {
				md.AddToTable(MDTable.Param, ret_param);
				ret_param.BuildTables(md);
			}
			for (int i=0; i < numPars; i++) {
				md.AddToTable(MDTable.Param,parList[i]);
				parList[i].BuildTables(md);
			}
			if (varArgSigList != null) {
				foreach (MethodRef varArgSig in varArgSigList) {
					md.AddToTable(MDTable.MemberRef,varArgSig);
					varArgSig.BuildTables(md);
				}
			}
			// Console.WriteLine("method has " + numPars + " parameters");
			done = true;
		}