public override void VisitLocalVarSig(LocalVarSig localvar) { int start; Utilities.ReadCompressedInteger(m_blobData, (int)localvar.BlobIndex, out start); localvar.CallingConvention = m_blobData [start]; localvar.Local = (localvar.CallingConvention & 0x7) != 0; localvar.Count = Utilities.ReadCompressedInteger(m_blobData, start + 1, out start); localvar.LocalVariables = this.ReadLocalVariables(localvar.Count, m_blobData, start); }
public LocalVarSig GetLocalVarSig(uint index) { LocalVarSig lv = m_signatures [index] as LocalVarSig; if (lv == null) { lv = new LocalVarSig(index); lv.Accept(this); m_signatures [index] = lv; } return(lv); }
LocalVarSig GetLocalVarSig (VariableDefinitionCollection vars) { LocalVarSig lvs = new LocalVarSig (); lvs.CallingConvention |= 0x7; lvs.Count = vars.Count; lvs.LocalVariables = new LocalVarSig.LocalVariable [lvs.Count]; for (int i = 0; i < lvs.Count; i++) { LocalVarSig.LocalVariable lv = new LocalVarSig.LocalVariable (); TypeReference type = vars [i].VariableType; lv.CustomMods = m_reflectWriter.GetCustomMods (type); if (type is PinnedType) { lv.Constraint |= Constraint.Pinned; type = (type as PinnedType).ElementType; } if (type is ReferenceType) { lv.ByRef = true; type = (type as ReferenceType).ElementType; } lv.Type = m_reflectWriter.GetSigType (type); lvs.LocalVariables [i] = lv; } return lvs; }
public uint AddLocalVarSig (LocalVarSig lvs) { return AddSignature (lvs); }
void Write (LocalVarSig.LocalVariable var) { Write (var.CustomMods); if ((var.Constraint & Constraint.Pinned) != 0) Write (ElementType.Pinned); if (var.ByRef) Write (ElementType.ByRef); Write (var.Type); }
void Write (LocalVarSig.LocalVariable [] vars) { foreach (LocalVarSig.LocalVariable var in vars) Write (var); }
public override void VisitLocalVarSig (LocalVarSig localvar) { m_sigWriter.Write (localvar.CallingConvention); Write (localvar.Count); Write (localvar.LocalVariables); }
public byte [] CompressLocalVar (LocalVarSig.LocalVariable var) { m_sigWriter.Empty (); Write (var); return m_sigWriter.ToArray (); }
public uint AddLocalVarSig(LocalVarSig lvs) { return(AddSignature(lvs)); }
public override void VisitLocalVarSig(LocalVarSig localvar) { m_sigWriter.Write(localvar.CallingConvention); Write(localvar.Count); Write(localvar.LocalVariables); }
public override void VisitLocalVarSig(LocalVarSig localvar) { int start; Utilities.ReadCompressedInteger (m_blobData, (int) localvar.BlobIndex, out start); localvar.CallingConvention = m_blobData [start]; localvar.Local = (localvar.CallingConvention & 0x7) != 0; localvar.Count = Utilities.ReadCompressedInteger (m_blobData, start + 1, out start); localvar.LocalVariables = ReadLocalVariables (localvar.Count, m_blobData, start); }
public LocalVarSig GetLocalVarSig(uint index) { LocalVarSig lv = m_signatures [index] as LocalVarSig; if (lv == null) { lv = new LocalVarSig (index); lv.Accept (this); m_signatures [index] = lv; } return lv; }
public LocalVarSig GetLocalVarSig(VariableDefinitionCollection vars) { LocalVarSig lvs = new LocalVarSig (); lvs.CallingConvention |= 0x7; lvs.Count = vars.Count; lvs.LocalVariables = new LocalVarSig.LocalVariable [lvs.Count]; for (int i = 0; i < lvs.Count; i++) { lvs.LocalVariables [i] = GetLocalVariableSig (vars [i]); } return lvs; }