public JSTreeNode(string text, string sysInfo, string bodyCode, IlTypes type) { this.text = text; this.type = FormatType(type); data = $"{sysInfo}{Environment.NewLine}" + $"{{{Environment.NewLine}" + $"{WithOffset(bodyCode)}" + $"{Environment.NewLine}}}"; }
private string FormatType(IlTypes type) { switch (type) { case IlTypes.MethodInstance | IlTypes.MethodGeneric: return("method-instance-generic"); case IlTypes.MethodStatic | IlTypes.MethodGeneric: return("method-static-generic"); default: return(FormatType(type.GetType().GetEnumName(type))); } }