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

Feature: OfType Operator #865

Merged
merged 10 commits into from
Feb 26, 2024

Conversation

dwcullop
Copy link
Member

@dwcullop dwcullop commented Feb 22, 2024

Description

A new operator OfType that is similar to the LINQ operator with the same name. It converts a changeset of some base type (or interface) to a changeset of a different type by automatically excluding values that can't be cast as the new type. It effectively combines ImmutableFilter and ImmutableTransform into a single operator for maximum efficiency for the case when both operations are trivial.

Bonus Changes

Creates Test-compatible version of the Spy (named TestSpy) that emits output to ITestOutputHelper so that the contents of the Observables can be seen in the test results.

@dwcullop dwcullop marked this pull request as ready for review February 23, 2024 03:02
@dwcullop dwcullop self-assigned this Feb 23, 2024
src/DynamicData.Tests/Utilities/ObservableSpy.cs Outdated Show resolved Hide resolved
src/DynamicData/Cache/ObservableCacheEx.cs Outdated Show resolved Hide resolved
src/DynamicData/Cache/ObservableCacheEx.cs Outdated Show resolved Hide resolved
src/DynamicData/Cache/ObservableCacheEx.cs Outdated Show resolved Hide resolved
@dwcullop dwcullop enabled auto-merge (squash) February 26, 2024 16:29
@dwcullop dwcullop merged commit 0e5497a into reactivemarbles:main Feb 26, 2024
1 check passed
@dwcullop dwcullop deleted the feature/of-type-operator branch February 26, 2024 16:43
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants