Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hacking new serialization with Steve at techorama #75

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

Mpdreamz
Copy link
Member

@Mpdreamz Mpdreamz commented Oct 8, 2024

No description provided.

Mpdreamz and others added 10 commits October 8, 2024 14:16
Updated `ConsumeOutboundEventsAsync` in `BufferedChannelBase.cs` to conditionally cancel `_exitCancelSource` using `CancelAsync` for .NET 8.0 or greater, and `Cancel` for other versions. Modified `ToString` method to return a nullable string (`string?`).

Updated target frameworks in `Elastic.Channels.csproj` and `Elastic.Ingest.Elasticsearch.csproj` to include `net8.0`.

Enhanced `WriteBufferToStreamAsync` in `ElasticsearchChannelBase.Bytes.cs` to handle `IndexOp.CreateNoParams` and use `SerializePlainIndexHeaderAsync` for serialization.

Removed several `using` directives in `ElasticsearchChannelBase.Serialization.cs` and introduced static read-only spans for `PlainIndexBytesSpan` and `PlainCreateBytesSpan`. Added conditional compilation for serialization methods to use `ValueTask` and `ReadOnlySpan<byte>` for .NET 8.0 or greater, and `byte[]` for other versions.
- DataStreamChannel.cs: Removed unnecessary BulkHeader creation.
- Elastic.Ingest.Elasticsearch.csproj: Enabled unsafe blocks.
- ElasticsearchChannelBase.Bytes.cs: Standardized IReadOnlyList<TEvent> handling and updated SerializeHeaderAsync.
- ElasticsearchChannelBase.Serialization.cs: Added usings, optimized serialization for .NET 8.0, and added new methods.
- BulkHeader.cs: Standardized comment punctuation.
- Elastic.Ingest.Elasticsearch.Tests.csproj: Added net8.0 target framework.
- IndexChannelTests.cs: Added new tests and enhanced ExecuteAndAssert method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants