Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Unset Parent on Conductors' Items.Clear()#637

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
adamgauthier wants to merge1 commit intoCaliburn-Micro:master
base:master
Choose a base branch
Loading
fromadamgauthier:parent-unset-on-clear

Conversation

@adamgauthier
Copy link
Contributor

@adamgauthieradamgauthier commentedSep 24, 2019
edited
Loading

ObservableCollection is designed so
NotifyCollectionChangedEventArgs.OldItems is not populated when .Clear()
is called on the collection. Because of this, Caliburn conductors can't
unset the Parent property on all conducted IChild.

There are multiple solutions to this issue that have been discussed, but
I feel like adding a new CollectionCleared event to BindableCollection
is the best compromise considering it doesn't break any existing code
and only extends existing ObservableCollection functionality.

Fixes#465

@adamgauthier
Copy link
ContributorAuthor

More discussion in#465 and onstackoverflow.

@adamgauthier
Copy link
ContributorAuthor

Caliburn.Micro.Core.Tests.EventAggregatorSubscribing.Caliburn.Micro.Core.Tests.EventAggregatorSubscribing.A_valid_subscriber_is_assigned_as_a_handler_its_message_typeAssert.True() FailureExpected: TrueActual:   False

Not sure why that test is failing, everything is green locally. 🤔

ObservableCollection<T> is designed soNotifyCollectionChangedEventArgs.OldItems is not populated when .Clear()is called on the collection. Because of this, Caliburn conductors can'tunset the Parent property on all conducted IChild.There are multiple solutions to this issue that have been discussed, butI feel like adding a new CollectionCleared event to BindableCollectionis the best compromise considering it doesn't break any existing codeand only extends existing ObservableCollection functionality.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Conductor<T>.Collection.OneActive/AllActive - IChild.Parent not reset on clear

1 participant

@adamgauthier

[8]ページ先頭

©2009-2025 Movatter.jp