Skip to content

Conversation

@Lamparter
Copy link
Member

This is incomplete and I had to leave my desk while implementing it.

Feel no need to merge this PR or do anything with the implementation here (which is mostly missing).

@Lamparter Lamparter force-pushed the connections branch 2 times, most recently from 49439fb to ad9e8ce Compare April 22, 2025 16:53
@Arlodotexe Arlodotexe self-assigned this May 15, 2025
- Changed the type of InnerConnections in ModifiableEntity, ModifiableProject, ModifiableProjectRole, ModifiablePublisher, ModifiableUser, and ModifiableUserRole from IModifiableConnectionsCollection to ModifiableConnectionCollection.
- Updated methods to use renamed ModifiableConnectionCollection type
- Renamed ReadOnlyConnectionsCollection to ReadOnlyConnectionCollection
- Refactored Connections property to GetConnectionsAsync.
- Updated ModifiableConnection and ModifiableConnectionCollection classes to handle connection add/remove methods, event stream entry updates and class events.
- Updated ReadOnlyConnection to implement IDelegable<Connection> and added GetValueAsync method.
- Ensured all relevant classes now utilize the newly implemented connection handling implementation.
- Modified ModifiableImagesCollection to include an additional parameter for image files in ApplyEntryUpdateAsync methods.
@Arlodotexe Arlodotexe marked this pull request as ready for review May 15, 2025 04:22
@Arlodotexe Arlodotexe requested a review from Copilot May 15, 2025 04:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces an initial implementation for a virtual event stream handler related to Connections, converting various connection-related properties to use concrete collection types and asynchronous patterns. Key changes include replacing IReadOnlyConnectionsCollection with ReadOnlyConnectionCollection in entities, adding asynchronous methods for retrieving connections, and updating model definitions from dictionaries to arrays.

Reviewed Changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Nomad/ReadOnlyEntity.cs Updates InnerConnections type and removes the old Connections property in favor of an async method.
src/Nomad/ReadOnlyConnectionCollection.cs Implements a new read-only connections collection with async support.
src/Nomad/ReadOnlyConnection.cs Adds asynchronous GetValueAsync implementation based on the new connection model.
src/Nomad/ModifiableUserRole.cs Refactors methods to use lambda expressions and introduces async methods for connections.
src/Nomad/ModifiablePublisherRole.cs Updates connection-related methods to use async enumerables.
src/Nomad/ModifiablePublisher.cs Adjusts connection collection usage for publishers.
src/Nomad/ModifiableProjectRole.cs Introduces an async method to fetch connections.
src/Nomad/ModifiableProject.cs Revises the connection collection implementation to use async methods.
src/Nomad/ModifiableImagesCollection.cs Enhances image update methods with an additional parameter and updated event invocations.
src/Nomad/ModifiableEntity.cs Updates InnerConnections type and integrates async connections retrieval and reset.
src/Nomad/ModifiableConnectionCollection.cs New implementation supporting add/remove connection events via async event stream updates.
src/Nomad/ModifiableConnection.cs Adds a new modifiable connection implementation using async updates.
src/Nomad/ModifiableAccentColor.cs Refactors the UpdateAccentColorAsync method while keeping consistent event stream handling.
src/Models/User.cs, Publisher.cs, Project.cs Changes the Connections property from a dictionary to an array for consistency with new connection models.
src/Models/IConnections.cs Revises the IConnections interface to use a Connection[] and adds a new Connection record definition.
src/IReadOnlyConnectionsCollection.cs Modifies the interface to expose an async method for retrieving connections.
src/IReadOnlyConnection.cs Adjusts the interface to expose an asynchronous getter for connection values.

@Arlodotexe Arlodotexe merged commit 9d5af5d into WindowsAppCommunity:main May 15, 2025
1 check failed
@Lamparter Lamparter deleted the connections branch May 15, 2025 07:22
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.

Planning and tracking implementation of "Connections" event stream handler

2 participants