all keys after data

alphons <alphons@heijden.com> 13 Jan 2025, 09:34
6549adac4b04d405260f7fb8180caa8d4266d9fb
2 files changed
  • RedisGui/FormMain.cs
  • RedisGui/Helper.cs
diff --git a/RedisGui/FormMain.cs b/RedisGui/FormMain.cs
index 281386a..cb13c92 100644
--- a/RedisGui/FormMain.cs
+++ b/RedisGui/FormMain.cs
@@ -162,9 +162,8 @@ public partial class FormMain : Form
{
if (entry.Value.Box() is byte[] buffer)
{
- this.listView1.Items.Add(new ListViewItem([entry.Name.ToString(), $"*binary* (len {buffer.Length})"]));
//this.txtData.Text = Helper.ConvertByteArrayToHexText(buffer);
- Helper.SessionDecoder(this.listView1, buffer);
+ Helper.SessionDecoder(this.listView1, entry.Name.ToString(), buffer);
continue;
}
}
diff --git a/RedisGui/Helper.cs b/RedisGui/Helper.cs
index 6a1b9c8..888b1ab 100644
--- a/RedisGui/Helper.cs
+++ b/RedisGui/Helper.cs
@@ -1,7 +1,9 @@
-using System.Buffers.Binary;
+using System;
+using System.Buffers.Binary;
using System.Text;
using System.Text.Json;
using System.Text.RegularExpressions;
+using System.Xml.Linq;
namespace RedisGui;
@@ -51,8 +53,11 @@ public class Helper
return $"{major}.{minor}";
}
- public static void SessionDecoder(ListView lv, byte[] b)
+ public static void SessionDecoder(ListView lv, string entryName, byte[] b)
{
+ lv.Items.Add(new ListViewItem([entryName, $"*binary* (len {b.Length})"]));
+ lv.Items.Add(new ListViewItem(["--------------", "--------------"]));
+
var index = 0;
lv.Items.Add(new ListViewItem([ "Version", ReadVersion(b, ref index) ]));
var count = ReadInt16(b, ref index);