diff --git a/src/Plugins/LevelDBStore/IO/Data/LevelDB/DB.cs b/src/Plugins/LevelDBStore/IO/Data/LevelDB/DB.cs index 088e0e72c0..08a84aa5c8 100644 --- a/src/Plugins/LevelDBStore/IO/Data/LevelDB/DB.cs +++ b/src/Plugins/LevelDBStore/IO/Data/LevelDB/DB.cs @@ -11,10 +11,8 @@ #nullable enable -using Neo.Plugins.Storage; using System.Collections; using System.Collections.Generic; -using System.Diagnostics; using System.IO; namespace Neo.IO.Storage.LevelDB @@ -23,7 +21,6 @@ namespace Neo.IO.Storage.LevelDB /// A DB is a persistent ordered map from keys to values. /// A DB is safe for concurrent access from multiple threads without any external synchronization. /// - [DebuggerTypeProxy(typeof(KeyValuePairsDebugView))] public class DB : LevelDBHandle, IEnumerable> { private DB(nint handle) : base(handle) { } diff --git a/src/Plugins/LevelDBStore/Plugins/Storage/KeyValuePairs.cs b/src/Plugins/LevelDBStore/Plugins/Storage/KeyValuePairs.cs deleted file mode 100644 index 54f3946714..0000000000 --- a/src/Plugins/LevelDBStore/Plugins/Storage/KeyValuePairs.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2015-2024 The Neo Project. -// -// KeyValuePairs.cs file belongs to the neo project and is free -// software distributed under the MIT software license, see the -// accompanying file LICENSE in the main directory of the -// repository or http://www.opensource.org/licenses/mit-license.php -// for more details. -// -// Redistribution and use in source and binary forms with or without -// modifications are permitted. - -using System.Diagnostics; -using System.Linq; - -namespace Neo.Plugins.Storage -{ - [DebuggerDisplay("Key = {_key}, Value = {_value}")] - internal class KeyValuePairs( - byte[] key, - byte[] value) - { - private readonly string _key = $"[{string.Join(", ", key.Select(s => "0x" + s.ToString("x02")))}]"; - private readonly string _value = $"[{string.Join(", ", value.Select(s => "0x" + s.ToString("x02")))}]"; - } -} diff --git a/src/Plugins/LevelDBStore/Plugins/Storage/KeyValuePairsDebugView.cs b/src/Plugins/LevelDBStore/Plugins/Storage/KeyValuePairsDebugView.cs deleted file mode 100644 index e9e66f9ff1..0000000000 --- a/src/Plugins/LevelDBStore/Plugins/Storage/KeyValuePairsDebugView.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (C) 2015-2024 The Neo Project. -// -// KeyValuePairsDebugView.cs file belongs to the neo project and is free -// software distributed under the MIT software license, see the -// accompanying file LICENSE in the main directory of the -// repository or http://www.opensource.org/licenses/mit-license.php -// for more details. -// -// Redistribution and use in source and binary forms with or without -// modifications are permitted. - -using System.Collections.Generic; -using System.Diagnostics; - -namespace Neo.Plugins.Storage -{ - internal class KeyValuePairsDebugView( - IEnumerable> data) - { - private readonly IEnumerable> _data = data; - - [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] - public KeyValuePairs[] Keys - { - get - { - var keys = new List(); - - foreach (var item in _data) - keys.Add(new KeyValuePairs(item.Key, item.Value)); - return [.. keys]; - } - } - } -} diff --git a/src/Plugins/LevelDBStore/Plugins/Storage/Snapshot.cs b/src/Plugins/LevelDBStore/Plugins/Storage/Snapshot.cs index 897b0fbade..4a16f3e6f3 100644 --- a/src/Plugins/LevelDBStore/Plugins/Storage/Snapshot.cs +++ b/src/Plugins/LevelDBStore/Plugins/Storage/Snapshot.cs @@ -13,12 +13,10 @@ using Neo.Persistence; using System.Collections; using System.Collections.Generic; -using System.Diagnostics; using LSnapshot = Neo.IO.Storage.LevelDB.Snapshot; namespace Neo.Plugins.Storage { - [DebuggerTypeProxy(typeof(KeyValuePairsDebugView))] internal class Snapshot : ISnapshot, IEnumerable> { private readonly DB _db; diff --git a/src/Plugins/LevelDBStore/Plugins/Storage/Store.cs b/src/Plugins/LevelDBStore/Plugins/Storage/Store.cs index 0a959af8ef..3928400de0 100644 --- a/src/Plugins/LevelDBStore/Plugins/Storage/Store.cs +++ b/src/Plugins/LevelDBStore/Plugins/Storage/Store.cs @@ -13,11 +13,9 @@ using Neo.Persistence; using System.Collections; using System.Collections.Generic; -using System.Diagnostics; namespace Neo.Plugins.Storage { - [DebuggerTypeProxy(typeof(KeyValuePairsDebugView))] internal class Store : IStore, IEnumerable> { private readonly DB _db;