internal static CilLocal[] DecodeLocalSignature(MethodBodyBlock methodBody, MetadataReader metadataReader, CilTypeProvider provider) { if (methodBody.LocalSignature.IsNil) { return(new CilLocal[0]); } ImmutableArray <CilType> localTypes = SignatureDecoder.DecodeLocalSignature(methodBody.LocalSignature, provider); CilLocal[] locals = new CilLocal[localTypes.Length]; for (int i = 0; i < localTypes.Length; i++) { string name = "V_" + i; locals[i] = new CilLocal(name, localTypes[i].ToString()); } return(locals); }
public void Visit(CilLocal local) { _writer.Write(string.Format("{0} {1}", local.Type, local.Name)); }
internal static CilLocal[] DecodeLocalSignature(MethodBodyBlock methodBody, MetadataReader metadataReader, CilTypeProvider provider) { if (methodBody.LocalSignature.IsNil) { return new CilLocal[0]; } ImmutableArray<CilType> localTypes = SignatureDecoder.DecodeLocalSignature(methodBody.LocalSignature, provider); CilLocal[] locals = new CilLocal[localTypes.Length]; for (int i = 0; i < localTypes.Length; i++) { string name = "V_" + i; locals[i] = new CilLocal(name, localTypes[i].ToString()); } return locals; }