diff --git a/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/.editorconfig b/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/.editorconfig index 5e51edaf1..24b8ee970 100644 --- a/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/.editorconfig +++ b/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/.editorconfig @@ -2,3 +2,6 @@ # CS0618: Type or member is obsolete dotnet_diagnostic.CS0618.severity = silent + +# IDE0028: Simplify collection initialization +dotnet_diagnostic.IDE0028.severity = silent diff --git a/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/AI/Models/SequenceBuilder.cs b/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/AI/Models/SequenceBuilder.cs index 17105b53a..979105d67 100644 --- a/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/AI/Models/SequenceBuilder.cs +++ b/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/AI/Models/SequenceBuilder.cs @@ -3,10 +3,10 @@ namespace Microsoft.Teams.AI.AI.Models { - public class SequenceBuilder + internal class SequenceBuilder { - private Segment _first; - private Segment _last; + private Segment? _first; + private Segment? _last; public void Append(ReadOnlyMemory data) { diff --git a/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/AI/Models/StreamingChatToolCallsBuilder.cs b/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/AI/Models/StreamingChatToolCallsBuilder.cs index 80f10c10f..78b1f23b7 100644 --- a/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/AI/Models/StreamingChatToolCallsBuilder.cs +++ b/dotnet/packages/Microsoft.TeamsAI/Microsoft.TeamsAI/AI/Models/StreamingChatToolCallsBuilder.cs @@ -3,11 +3,11 @@ namespace Microsoft.Teams.AI.AI.Models { - public class StreamingChatToolCallsBuilder + internal class StreamingChatToolCallsBuilder { - private readonly Dictionary _indexToToolCallId = []; - private readonly Dictionary _indexToFunctionName = []; - private readonly Dictionary> _indexToFunctionArguments = []; + private readonly Dictionary _indexToToolCallId = new(); + private readonly Dictionary _indexToFunctionName = new(); + private readonly Dictionary> _indexToFunctionArguments = new(); public void Append(StreamingChatToolCallUpdate toolCallUpdate) { @@ -39,7 +39,7 @@ public void Append(StreamingChatToolCallUpdate toolCallUpdate) public IReadOnlyList Build() { - List toolCalls = []; + List toolCalls = new(); foreach (KeyValuePair indexToToolCallIdPair in _indexToToolCallId) {