diff --git a/src/ZoneTree/Core/ZoneTree.cs b/src/ZoneTree/Core/ZoneTree.cs index 042326a..2353269 100644 --- a/src/ZoneTree/Core/ZoneTree.cs +++ b/src/ZoneTree/Core/ZoneTree.cs @@ -1,10 +1,12 @@ using System.Collections.Concurrent; using Tenray.ZoneTree.Collections; +using Tenray.ZoneTree.Comparers; using Tenray.ZoneTree.Logger; using Tenray.ZoneTree.Options; using Tenray.ZoneTree.Segments; using Tenray.ZoneTree.Segments.InMemory; using Tenray.ZoneTree.Segments.NullDisk; +using Tenray.ZoneTree.Serializers; namespace Tenray.ZoneTree.Core; @@ -124,6 +126,12 @@ public long TotalRecordCount public bool IsReadOnly { get => _isReadOnly; set => _isReadOnly = value; } + public IRefComparer Comparer => Options.Comparer; + + public ISerializer KeySerializer => Options.KeySerializer; + + public ISerializer ValueSerializer => Options.ValueSerializer; + public ZoneTree(ZoneTreeOptions options) { Logger = options.Logger; diff --git a/src/ZoneTree/IZoneTree.cs b/src/ZoneTree/IZoneTree.cs index 22a70b8..bea1f6a 100644 --- a/src/ZoneTree/IZoneTree.cs +++ b/src/ZoneTree/IZoneTree.cs @@ -1,4 +1,6 @@ -using Tenray.ZoneTree.Logger; +using Tenray.ZoneTree.Comparers; +using Tenray.ZoneTree.Logger; +using Tenray.ZoneTree.Serializers; namespace Tenray.ZoneTree; @@ -9,6 +11,21 @@ namespace Tenray.ZoneTree; /// The value type public interface IZoneTree : IDisposable { + /// + /// The key comparer. + /// + public IRefComparer Comparer { get; } + + /// + /// The key serializer. + /// + public ISerializer KeySerializer { get; } + + /// + /// The value serializer. + /// + public ISerializer ValueSerializer { get; } + /// /// Checks the existence of the key in the tree. ///