Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/skills/csharp-snippet-modernization/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Apply these changes when they preserve behavior and sample clarity:
timeZoneTime.DateTime);
```
- Use raw string literals (or interpolated raw string literals) for paragraph-style output.
- Use target-typed `new` when the target type is evident.
- Use `new` to construct objects. Omit the type name when the target type is evident.
- Use collection expressions to initialize collections and arrays wherever possible.
- Convert eligible value-producing `switch` statements to switch expressions.
- Use auto-implemented properties instead of defining a separate field.
Expand All @@ -51,6 +51,8 @@ Apply these changes when they preserve behavior and sample clarity:
- Remove `this.` where it's unnecessary.
- Add `using` statements for disposable types, and remove redundant calls to `Close()` or `Dispose()`.
- Prune unnecessary package references from project files.
- Use compound assignment.
- Replace calls to obsolete APIs with their recommended replacements (per the `ObsoleteAttribute` message and official docs). For example, replace `WebRequest` with `HttpClient`.

Don't introduce `var`; this repository prefers explicit types.

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ops-build-reporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:

jobs:
ops_build_reporter_job:
name: Add preview links to PR body and annotate files with build warnings
name: Add preview links and annotate files
runs-on: ubuntu-latest
permissions:
statuses: read
Expand Down
68 changes: 34 additions & 34 deletions _zip/missingapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,139 +38,139 @@ references:
- uid: OpenAI.Assistants.Assistant
name: Assistant
fullname: OpenAI.Assistants.Assistant
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Assistants.netstandard2.0.cs
- uid: OpenAI.Assistants.AssistantClient
name: AssistantClient
fullname: OpenAI.Assistants.AssistantClient
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Assistants.netstandard2.0.cs
- uid: OpenAI.Assistants.FunctionToolDefinition
name: FunctionToolDefinition
fullname: OpenAI.Assistants.FunctionToolDefinition
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Assistants.netstandard2.0.cs
- uid: OpenAI.Audio.AudioClient
name: AudioClient
fullname: OpenAI.Audio.AudioClient
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Audio.netstandard2.0.cs
- uid: OpenAI.Chat.ChatClient
name: ChatClient
fullname: OpenAI.Chat.ChatClient
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Chat.netstandard2.0.cs
- uid: OpenAI.Chat.ChatCompletion
name: ChatCompletion
fullname: OpenAI.Chat.ChatCompletion
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Chat.netstandard2.0.cs
- uid: OpenAI.Chat.ChatCompletionOptions
name: ChatCompletionOptions
fullname: OpenAI.Chat.ChatCompletionOptions
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Chat.netstandard2.0.cs
- uid: OpenAI.Chat.ChatMessage
name: ChatMessage
fullname: OpenAI.Chat.ChatMessage
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Chat.netstandard2.0.cs
- uid: OpenAI.Chat.ChatResponseFormat
name: ChatResponseFormat
fullname: OpenAI.Chat.ChatResponseFormat
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Chat.netstandard2.0.cs
- uid: OpenAI.Chat.ChatTool
name: ChatTool
fullname: OpenAI.Chat.ChatTool
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Chat.netstandard2.0.cs
- uid: OpenAI.Chat.StreamingChatCompletionUpdate
name: StreamingChatCompletionUpdate
fullname: OpenAI.Chat.StreamingChatCompletionUpdate
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Chat.netstandard2.0.cs
- uid: OpenAI.Containers.ContainerClient
name: ContainerClient
fullname: OpenAI.Containers.ContainerClient
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Containers.netstandard2.0.cs
- uid: OpenAI.Embeddings.EmbeddingClient
name: EmbeddingClient
fullname: OpenAI.Embeddings.EmbeddingClient
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Embeddings.netstandard2.0.cs
- uid: OpenAI.Files.OpenAIFileClient
name: OpenAIFileClient
fullname: OpenAI.Files.OpenAIFileClient
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Files.netstandard2.0.cs
- uid: OpenAI.Images.ImageClient
name: ImageClient
fullname: OpenAI.Images.ImageClient
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Images.netstandard2.0.cs
- uid: OpenAI.OpenAIClient
name: OpenAIClient
fullname: OpenAI.OpenAIClient
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.netstandard2.0.cs
- uid: OpenAI.Realtime.ConversationFunctionTool
name: ConversationFunctionTool
fullname: OpenAI.Realtime.ConversationFunctionTool
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Realtime.netstandard2.0.cs
- uid: OpenAI.Realtime.RealtimeClient
name: RealtimeClient
fullname: OpenAI.Realtime.RealtimeClient
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Realtime.netstandard2.0.cs
- uid: OpenAI.Realtime.RealtimeFunctionTool
name: RealtimeFunctionTool
fullname: OpenAI.Realtime.RealtimeFunctionTool
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Realtime.netstandard2.0.cs
- uid: OpenAI.RealtimeConversation.ConversationFunctionTool
name: ConversationFunctionTool
fullname: OpenAI.RealtimeConversation.ConversationFunctionTool
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Realtime.netstandard2.0.cs
- uid: OpenAI.RealtimeConversation.ConversationUpdate
name: ConversationUpdate
fullname: OpenAI.RealtimeConversation.ConversationUpdate
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.RealtimeConversation.netstandard2.0.cs
- uid: OpenAI.RealtimeConversation.RealtimeConversationClient
name: RealtimeConversationClient
fullname: OpenAI.RealtimeConversation.RealtimeConversationClient
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.RealtimeConversation.netstandard2.0.cs
- uid: OpenAI.RealtimeConversation.RealtimeConversationSession
name: RealtimeConversationSession
fullname: OpenAI.RealtimeConversation.RealtimeConversationSession
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.RealtimeConversation.netstandard2.0.cs
- uid: OpenAI.Responses.CreateResponseOptions
name: CreateResponseOptions
fullname: OpenAI.Responses.CreateResponseOptions
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Responses.netstandard2.0.cs
- uid: OpenAI.Responses.FunctionTool
name: FunctionTool
fullname: OpenAI.Responses.FunctionTool
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Responses.netstandard2.0.cs
- uid: OpenAI.Responses.OpenAIResponse
name: OpenAIResponse
fullname: OpenAI.Responses.OpenAIResponse
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Responses.netstandard2.0.cs
- uid: OpenAI.Responses.OpenAIResponseClient
name: OpenAIResponseClient
fullname: OpenAI.Responses.OpenAIResponseClient
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Responses.netstandard2.0.cs
- uid: OpenAI.Responses.ResponseCreationOptions
name: ResponseCreationOptions
fullname: OpenAI.Responses.ResponseCreationOptions
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Responses.netstandard2.0.cs
- uid: OpenAI.Responses.ResponseItem
name: ResponseItem
fullname: OpenAI.Responses.ResponseItem
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Responses.netstandard2.0.cs
- uid: OpenAI.Responses.ResponseResult
name: ResponseResult
fullname: OpenAI.Responses.ResponseResult
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Responses.netstandard2.0.cs
- uid: OpenAI.Responses.ResponsesClient
name: ResponsesClient
fullname: OpenAI.Responses.ResponsesClient
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Responses.netstandard2.0.cs
- uid: OpenAI.Responses.ResponseTextFormat
name: ResponseTextFormat
fullname: OpenAI.Responses.ResponseTextFormat
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Responses.netstandard2.0.cs
- uid: OpenAI.Responses.ResponseTool
name: ResponseTool
fullname: OpenAI.Responses.ResponseTool
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Responses.netstandard2.0.cs
- uid: OpenAI.Responses.StreamingResponseUpdate
name: StreamingResponseUpdate
fullname: OpenAI.Responses.StreamingResponseUpdate
href: https://github.com/openai/openai-dotnet/blob/main/api/OpenAI.netstandard2.0.cs
href: https://github.com/openai/openai-dotnet/blob/main/api/released/netstandard2.0/OpenAI.Responses.netstandard2.0.cs
- uid: Polly.CircuitBreaker.CircuitBreakerStrategyOptions`1
name: CircuitBreakerStrategyOptions`1
fullname: Polly.CircuitBreaker.CircuitBreakerStrategyOptions`1
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Diagnostics.EventLog" Version="6.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// <snippet1>
using System.Diagnostics.Eventing.Reader;
using System.Diagnostics.Eventing.Reader;
using System.IO;

EventLogInformation eventLogInformation;
using EventLogSession session = new();
EventLogInformation eventLogInformation =
session.GetLogInformation("Application", PathType.LogName);

// <snippet1>
FileAttributes? fileAttributes = (FileAttributes?)eventLogInformation.Attributes;
// </snippet1>
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net10.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="6.0.0" />
</ItemGroup>

</Project>
Loading
Loading