Skip to content

Commit 04c3ef2

Browse files
Remove public APIs obsoleted in versions 5.7.0 to 5.13.0 (#363)
* Remove public APIs obsoleted under code TILEDB0012. * Remove public APIs obsoleted under code TILEDB0013. * Remove a no longer needed workaround. * Add a file with package validation suppressions. * Mark the example project as non-packable. * Remove public APIs obsoleted under code TILEDB0014. * Remove public APIs obsoleted under code TILEDB0015. * Fix typos. * Obsolete `FileStoreUtil`. * Update a test.
1 parent 117d75f commit 04c3ef2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+39
-1000
lines changed

docs/obsoletions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Following [the deprecation policy of TileDB Embedded][core-deprecation], obsolet
1010
|[`TILEDB0012`](#TILEDB0012)[`TILEDB0013`](#TILEDB0013)|5.7.0|5.9.0|
1111
|[`TILEDB0014`](#TILEDB0014)[`TILEDB0014`](#TILEDB0014)|5.8.0|5.10.0|
1212
|[`TILEDB0015`](#TILEDB0015)[`TILEDB0015`](#TILEDB0015)|5.13.0|5.15.0|
13-
|[`TILEDB0015`](#TILEDB0016)[`TILEDB0015`](#TILEDB0016)|5.17.0|5.19.0|
13+
|[`TILEDB0016`](#TILEDB0016)[`TILEDB0016`](#TILEDB0016)|5.17.0|5.19.0|
1414

1515
## `TILEDB0001` - Enum value names that start with `TILEDB_` were replaced with C#-friendly names.
1616

examples/TileDB.CSharp.Example/TileDB.CSharp.Example.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<RootNamespace>TileDB.CSharp.Examples</RootNamespace>
77
<TargetFramework>net8.0</TargetFramework>
88
<UseCurrentRuntimeIdentifier>true</UseCurrentRuntimeIdentifier>
9+
<IsPackable>false</IsPackable>
910
</PropertyGroup>
1011

1112
<ItemGroup>

sources/TileDB.CSharp/Array.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
using TileDB.CSharp.Marshalling;
66
using TileDB.CSharp.Marshalling.SafeHandles;
77
using TileDB.Interop;
8-
using ArrayHandle = TileDB.CSharp.Marshalling.SafeHandles.ArrayHandle;
9-
using ArraySchemaHandle = TileDB.CSharp.Marshalling.SafeHandles.ArraySchemaHandle;
10-
using ConfigHandle = TileDB.CSharp.Marshalling.SafeHandles.ConfigHandle;
118

129
namespace TileDB.CSharp;
1310

@@ -457,7 +454,7 @@ public static void Vacuum(Context ctx, string uri, Config? config = null)
457454
{
458455
using var dim = domain.Dimension(i);
459456
var dimName = dim.Name();
460-
var dimType = EnumUtil.DataTypeToType(dim.Type());
457+
var dimType = EnumUtil.DataTypeToNumericType(dim.Type());
461458

462459
switch (Type.GetTypeCode(dimType))
463460
{

sources/TileDB.CSharp/ArraySchema.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
using System.Collections.Generic;
33
using TileDB.CSharp.Marshalling.SafeHandles;
44
using TileDB.Interop;
5-
using ArraySchemaHandle = TileDB.CSharp.Marshalling.SafeHandles.ArraySchemaHandle;
6-
using FilterListHandle = TileDB.CSharp.Marshalling.SafeHandles.FilterListHandle;
7-
using DomainHandle = TileDB.CSharp.Marshalling.SafeHandles.DomainHandle;
8-
using AttributeHandle = TileDB.CSharp.Marshalling.SafeHandles.AttributeHandle;
95
using TileDB.CSharp.Marshalling;
106

117
namespace TileDB.CSharp;

sources/TileDB.CSharp/ArraySchemaEvolution.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using TileDB.CSharp.Marshalling.SafeHandles;
33
using TileDB.Interop;
4-
using ArraySchemaEvolutionHandle = TileDB.CSharp.Marshalling.SafeHandles.ArraySchemaEvolutionHandle;
54

65
namespace TileDB.CSharp;
76

sources/TileDB.CSharp/Attribute.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
using TileDB.Interop;
66
using TileDB.CSharp.Marshalling;
77
using TileDB.CSharp.Marshalling.SafeHandles;
8-
using AttributeHandle = TileDB.CSharp.Marshalling.SafeHandles.AttributeHandle;
9-
using FilterListHandle = TileDB.CSharp.Marshalling.SafeHandles.FilterListHandle;
108

119
namespace TileDB.CSharp;
1210

sources/TileDB.CSharp/CompatibilitySuppressions.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- https://learn.microsoft.com/en-us/dotnet/fundamentals/package-validation/diagnostic-ids -->
3-
<Suppressions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3+
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
44
<Suppression>
55
<DiagnosticId>PKV006</DiagnosticId>
66
<Target>net5.0</Target>

sources/TileDB.CSharp/Config.cs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System.Collections.Generic;
44
using TileDB.CSharp.Marshalling.SafeHandles;
55
using TileDB.Interop;
6-
using ConfigHandle = TileDB.CSharp.Marshalling.SafeHandles.ConfigHandle;
76

87
namespace TileDB.CSharp;
98

@@ -174,15 +173,6 @@ public void SaveToFile(string filename)
174173
ErrorHandling.CheckLastError(&p_tiledb_error, status);
175174
}
176175

177-
/// <summary>
178-
/// Gets a <see cref="ConfigIterator"/> that enumerates over all options whose parameter namess start with a given prefix.
179-
/// </summary>
180-
/// <param name="prefix">The parameters' name's prefix.</param>
181-
public ConfigIterator Iterate(string prefix)
182-
{
183-
return new ConfigIterator(_handle, prefix);
184-
}
185-
186176
/// <summary>
187177
/// Checks if two <see cref="Config"/>s have the same content.
188178
/// </summary>
@@ -206,11 +196,7 @@ public IEnumerator<KeyValuePair<string, string>> GetEnumerator() =>
206196

207197
private sealed class Enumerator(Config config, string prefix) : IEnumerator<KeyValuePair<string, string>>
208198
{
209-
#pragma warning disable TILEDB0015 // Type or member is obsolete
210-
// We use ConfigIterator as an implementation detail.
211-
// In the future, ConfigIterator will become internal and replace this class.
212199
private readonly ConfigIterator _iterator = new(config.Handle, prefix);
213-
#pragma warning restore TILEDB0015 // Type or member is obsolete
214200

215201
private readonly string _prefix = prefix;
216202

@@ -224,7 +210,7 @@ public bool MoveNext()
224210
{
225211
return false;
226212
}
227-
_current = _iterator.HereImpl();
213+
_current = _iterator.Here();
228214
_iterator.Next();
229215
return true;
230216
}

sources/TileDB.CSharp/ConfigIterator.cs

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,13 @@
22
using System.Collections.Generic;
33
using TileDB.CSharp.Marshalling.SafeHandles;
44
using TileDB.Interop;
5-
using ConfigHandle = TileDB.CSharp.Marshalling.SafeHandles.ConfigHandle;
6-
using ConfigIteratorHandle = TileDB.CSharp.Marshalling.SafeHandles.ConfigIteratorHandle;
75

86
namespace TileDB.CSharp;
97

10-
[Obsolete(Obsoletions.ConfigIteratorMessage, DiagnosticId = Obsoletions.ConfigIteratorDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
11-
public sealed unsafe class ConfigIterator : IDisposable
8+
internal sealed unsafe class ConfigIterator : IDisposable
129
{
1310
private readonly ConfigIteratorHandle _handle;
1411
private readonly ConfigHandle _hConfig;
15-
private bool _disposed;
1612

1713
internal ConfigIterator(ConfigHandle hConfig, string prefix)
1814
{
@@ -22,24 +18,11 @@ internal ConfigIterator(ConfigHandle hConfig, string prefix)
2218

2319
public void Dispose()
2420
{
25-
Dispose(true);
21+
_handle.Dispose();
2622
}
2723

28-
private void Dispose(bool disposing)
29-
{
30-
if (_disposed) return;
31-
if (disposing && (!_handle.IsInvalid))
32-
{
33-
_handle.Dispose();
34-
}
35-
36-
_disposed = true;
37-
}
38-
39-
internal ConfigIteratorHandle Handle => _handle;
40-
4124
// Internal overload that returns KVP to avoid the Tuple allocation.
42-
internal KeyValuePair<string, string> HereImpl()
25+
internal KeyValuePair<string, string> Here()
4326
{
4427
tiledb_error_t* p_tiledb_error;
4528
sbyte* paramPtr;
@@ -57,12 +40,6 @@ internal KeyValuePair<string, string> HereImpl()
5740
return new KeyValuePair<string, string>(param, value);
5841
}
5942

60-
public Tuple<string, string> Here()
61-
{
62-
var here = HereImpl();
63-
return new Tuple<string, string>(here.Key, here.Value);
64-
}
65-
6643
public void Next()
6744
{
6845
tiledb_error_t* p_tiledb_error;

sources/TileDB.CSharp/Context.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
using System.Text;
88
using TileDB.CSharp.Marshalling.SafeHandles;
99
using TileDB.Interop;
10-
using ContextHandle = TileDB.CSharp.Marshalling.SafeHandles.ContextHandle;
11-
using ConfigHandle = TileDB.CSharp.Marshalling.SafeHandles.ConfigHandle;
1210

1311
namespace TileDB.CSharp;
1412

0 commit comments

Comments
 (0)