Skip to content

Commit e790f65

Browse files
committed
Pin .NET SDK 9.0.306
1 parent b05b4cf commit e790f65

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

global.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"sdk": {
3+
"version": "9.0.306",
4+
"rollForward": "feature"
5+
}
6+
}

src/ManagedCode.AgentLightning.AgentRuntime/LightningAgent.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,6 @@ public LightningAgent(
4444
_timeProvider = timeProvider ?? TimeProvider.System;
4545
}
4646

47-
public Task<LightningExecutionResult> ExecuteAsync(
48-
object taskInput,
49-
NamedResources? resources,
50-
RolloutMode? mode = null,
51-
string? resourcesId = null,
52-
CancellationToken cancellationToken = default) =>
53-
base.ExecuteAsync(taskInput, resources, mode, resourcesId, cancellationToken);
54-
5547
protected override async Task<LightningExecutionResult> RolloutAsync(
5648
object taskInput,
5749
NamedResources? resources,

src/ManagedCode.AgentLightning.Core/Adapters/ActivityToSpanModelAdapter.cs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public sealed class ActivityToSpanModelAdapter : OtelTraceAdapter<IReadOnlyList<
2222
public ActivityToSpanModelAdapter(
2323
string? defaultRolloutId = null,
2424
string? defaultAttemptId = null,
25-
int sequenceSeed = 1,
25+
int sequenceSeed = 0,
2626
IComparer<Activity>? ordering = null,
2727
Func<Activity, Resource?>? resourceResolver = null)
2828
{
@@ -132,14 +132,19 @@ private static bool TryConvertToInt(object value, out int result)
132132
case long l when l is >= int.MinValue and <= int.MaxValue:
133133
result = (int)l;
134134
return true;
135-
case string s when int.TryParse(s, NumberStyles.Integer, CultureInfo.InvariantCulture, out var parsed):
136-
result = parsed;
137-
return true;
135+
case string s:
136+
if (int.TryParse(s, NumberStyles.Integer, CultureInfo.InvariantCulture, out var parsedFromString))
137+
{
138+
result = parsedFromString;
139+
return true;
140+
}
141+
142+
break;
138143
case IFormattable formattable:
139144
var asString = formattable.ToString(null, CultureInfo.InvariantCulture);
140-
if (int.TryParse(asString, NumberStyles.Integer, CultureInfo.InvariantCulture, out parsed))
145+
if (int.TryParse(asString, NumberStyles.Integer, CultureInfo.InvariantCulture, out var parsedFromFormattable))
141146
{
142-
result = parsed;
147+
result = parsedFromFormattable;
143148
return true;
144149
}
145150

0 commit comments

Comments
 (0)