Skip to content

Commit edd443c

Browse files
committed
Remove public APIs obsoleted under code TILEDB0013.
1 parent 130519c commit edd443c

File tree

4 files changed

+5
-69
lines changed

4 files changed

+5
-69
lines changed

sources/TileDB.CSharp/Array.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ public static void Vacuum(Context ctx, string uri, Config? config = null)
457457
{
458458
using var dim = domain.Dimension(i);
459459
var dimName = dim.Name();
460-
var dimType = EnumUtil.DataTypeToType(dim.Type());
460+
var dimType = EnumUtil.DataTypeToNumericType(dim.Type());
461461

462462
switch (Type.GetTypeCode(dimType))
463463
{

sources/TileDB.CSharp/Dimension.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public T TileExtent<T>() where T : struct
178178
public string TileExtentToStr()
179179
{
180180
var datatype = Type();
181-
var t = EnumUtil.DataTypeToType(datatype);
181+
var t = EnumUtil.DataTypeToNumericType(datatype);
182182
return System.Type.GetTypeCode(t) switch
183183
{
184184
TypeCode.Int16 => Format<short>(),
@@ -201,7 +201,7 @@ public string TileExtentToStr()
201201
public string DomainToStr()
202202
{
203203
var datatype = Type();
204-
var t = EnumUtil.DataTypeToType(datatype);
204+
var t = EnumUtil.DataTypeToNumericType(datatype);
205205
return System.Type.GetTypeCode(t) switch
206206
{
207207
TypeCode.Int16 => Format<short>(),

sources/TileDB.CSharp/Enumeration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ public System.Array GetValues()
287287
return result;
288288
}
289289

290-
Type type = EnumUtil.DataTypeToType(datatype);
290+
Type type = EnumUtil.DataTypeToNumericType(datatype);
291291
if (type == typeof(sbyte))
292292
{
293293
return GetValues<sbyte>(dataPtr, dataSize, offsetsPtr, offsetsSize);

sources/TileDB.CSharp/Enums.cs

Lines changed: 1 addition & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,8 +1150,7 @@ public static VfsMode VfsModeFromStr(string str)
11501150
/// </summary>
11511151
/// <param name="t">The type to convert.</param>
11521152
/// <exception cref="NotSupportedException"><paramref name="t"/> is unsupported.</exception>
1153-
[Obsolete(Obsoletions.DataTypeTypeConversionsMessage, DiagnosticId = Obsoletions.DataTypeTypeConversionsDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
1154-
public static DataType TypeToDataType(Type t)
1153+
internal static DataType TypeToDataType(Type t)
11551154
{
11561155
if (t == typeof(int))
11571156
{
@@ -1208,69 +1207,6 @@ public static DataType TypeToDataType(Type t)
12081207
}
12091208
}
12101209

1211-
[Obsolete(Obsoletions.DataTypeTypeConversionsMessage, DiagnosticId = Obsoletions.DataTypeTypeConversionsDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
1212-
public static Type DataTypeToType(DataType datatype)
1213-
{
1214-
switch (datatype)
1215-
{
1216-
case DataType.DateTimeAttosecond:
1217-
case DataType.DateTimeDay:
1218-
case DataType.DateTimeFemtosecond:
1219-
case DataType.DateTimeHour:
1220-
case DataType.DateTimeMinute:
1221-
case DataType.DateTimeMonth:
1222-
case DataType.DateTimeMillisecond:
1223-
case DataType.DateTimeNanosecond:
1224-
case DataType.DateTimePicosecond:
1225-
case DataType.DateTimeSecond:
1226-
case DataType.DateTimeMicrosecond:
1227-
case DataType.DateTimeWeek:
1228-
case DataType.DateTimeYear:
1229-
return typeof(long);
1230-
case DataType.Float32:
1231-
return typeof(float);
1232-
case DataType.Float64:
1233-
return typeof(double);
1234-
case DataType.Int16:
1235-
return typeof(short);
1236-
case DataType.Int32:
1237-
return typeof(int);
1238-
case DataType.Int64:
1239-
return typeof(long);
1240-
case DataType.Int8:
1241-
return typeof(sbyte);
1242-
case DataType.StringAscii:
1243-
case DataType.StringUtf16:
1244-
case DataType.StringUtf32:
1245-
case DataType.StringUtf8:
1246-
return typeof(sbyte);
1247-
case DataType.TimeAttosecond:
1248-
case DataType.TimeFemtosecond:
1249-
case DataType.TimeHour:
1250-
case DataType.TimeMinute:
1251-
case DataType.TimeMillisecond:
1252-
case DataType.TimeNanosecond:
1253-
case DataType.TimePicosecond:
1254-
case DataType.TimeSecond:
1255-
case DataType.TimeMicrosecond:
1256-
return typeof(long);
1257-
case DataType.UInt16:
1258-
return typeof(ushort);
1259-
case DataType.UInt32:
1260-
return typeof(uint);
1261-
case DataType.UInt64:
1262-
return typeof(ulong);
1263-
case DataType.UInt8:
1264-
return typeof(byte);
1265-
case DataType.Blob:
1266-
return typeof(byte);
1267-
case DataType.Boolean:
1268-
return typeof(byte);
1269-
default:
1270-
return typeof(byte);
1271-
}
1272-
}
1273-
12741210
// Same with DataTypeToType, but returns the correct corresponding numeric type for strings.
12751211
internal static Type DataTypeToNumericType(DataType datatype)
12761212
{

0 commit comments

Comments
 (0)