Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Explore making state part of the find data - #25691

Closed
JeremyKuhne wants to merge 1 commit into
dotnet:masterfrom
JeremyKuhne:finddatawithstate
Closed

JeremyKuhne wants to merge 1 commit into
dotnet:masterfrom
JeremyKuhne:finddatawithstate

Conversation

@JeremyKuhne

Copy link
Copy Markdown
Member

Making the change to put state in RawFindData as suggested by @svick on dotnet/designs#24 (comment). I think this way is better- note that I haven't added state to the transform delegate before, but it is intended to have it per the spec.

@svick, @danmosemsft, @terrajobst

@JeremyKuhne JeremyKuhne added * NO MERGE * The PR is not ready for merge yet (see discussion for detailed reasons) area-System.IO labels Dec 4, 2017
@JeremyKuhne JeremyKuhne added this to the Future milestone Dec 4, 2017
@JeremyKuhne JeremyKuhne self-assigned this Dec 4, 2017
@JeremyKuhne
JeremyKuhne requested a review from pjanotti December 4, 2017 19:55
/// Interface for filtering out find results.
/// </summary>
internal delegate bool FindPredicate<TState>(ref RawFindData findData, TState state);
internal delegate bool FindPredicate<TState>(ref RawFindData<TState> findData);

@stephentoub stephentoub Dec 5, 2017 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If both the delegate types have the same signature now, how about just defining a delegate:

internal delegate TResult FindFunc<TState, TResult>(ref RawFindData<TState> findData);

and using the same delegate for both?

/// Delegate for transforming raw find data into a result.
/// </summary>
internal delegate T FindTransform<T>(ref RawFindData findData);
internal delegate TResult FindTransform<TResult, TState>(ref RawFindData<TState> findData);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Generally the result type comes last. But see my earlier comment about unifying the delegates, anyway.

@karelz

karelz commented Jan 18, 2018

Copy link
Copy Markdown
Member

@JeremyKuhne looks like stale PR. Any plans to push it forward?

@karelz karelz removed this from the Future milestone Jan 18, 2018
@karelz

karelz commented Jan 27, 2018

Copy link
Copy Markdown
Member

@JeremyKuhne ping?

@JeremyKuhne

Copy link
Copy Markdown
Member Author

This is out of date.

@karelz karelz added this to the 2.1.0 milestone Feb 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.IO * NO MERGE * The PR is not ready for merge yet (see discussion for detailed reasons)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants