Skip to content

Commit dcc705d

Browse files
committed
Remove IsCompletedSuccessfully from IDuckTypeTask
Not supported in .NET Framework
1 parent 5d27945 commit dcc705d

File tree

4 files changed

+1
-41
lines changed

4 files changed

+1
-41
lines changed

tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Kafka/IAdminClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ namespace Datadog.Trace.ClrProfiler.AutoInstrumentation.Kafka;
1515
/// </summary>
1616
internal interface IAdminClient : IDuckType, IDisposable
1717
{
18-
IDescribeClusterTask DescribeClusterAsync(object? options);
18+
IDuckTypeTask<IDescribeClusterResult> DescribeClusterAsync(object? options);
1919
}

tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Kafka/IDescribeClusterTask.cs

Lines changed: 0 additions & 24 deletions
This file was deleted.

tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/Kafka/KafkaHelper.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
using System.Reflection;
1111
using System.Text;
1212
using System.Threading;
13-
using System.Threading.Tasks;
1413
using Datadog.Trace.Configuration.Schema;
1514
using Datadog.Trace.DataStreamsMonitoring;
1615
using Datadog.Trace.DataStreamsMonitoring.Utils;
@@ -464,11 +463,6 @@ internal static void TryInjectHeaders<TTopicPartitionMarker, TMessage>(
464463

465464
var duckTask = adminClient.DescribeClusterAsync(options);
466465

467-
if (duckTask.Status == TaskStatus.RanToCompletion)
468-
{
469-
return duckTask.Result?.ClusterId;
470-
}
471-
472466
var originalContext = SynchronizationContext.Current;
473467
try
474468
{

tracer/src/Datadog.Trace/DuckTyping/IDuckTypeTask.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ namespace Datadog.Trace.DuckTyping;
1212
/// <typeparam name="T">Type of the result</typeparam>
1313
public interface IDuckTypeTask<out T> : IDuckType
1414
{
15-
/// <summary>
16-
/// Gets a value indicating whether if the task is completed
17-
/// </summary>
18-
bool IsCompletedSuccessfully { get; }
19-
2015
/// <summary>
2116
/// Gets the result of the task
2217
/// </summary>
@@ -34,11 +29,6 @@ public interface IDuckTypeTask<out T> : IDuckType
3429
/// </summary>
3530
public interface IDuckTypeTask : IDuckType
3631
{
37-
/// <summary>
38-
/// Gets a value indicating whether if the task is completed
39-
/// </summary>
40-
bool IsCompletedSuccessfully { get; }
41-
4232
/// <summary>
4333
/// Gets the awaiter for the task
4434
/// </summary>

0 commit comments

Comments
 (0)