ContainedDataChanged

Posts   
 
    
daniele
User
Posts: 12
Joined: 05-Feb-2010
# Posted on: 28-Mar-2018 09:21:53   

Hi all, event ContainedDataChanged is called twice for each property changed, this behavior is by design?


var scope = new MyScope();
scope.ContainedDataChanged += Scope_ContainedDataChanged;
var item = new MyEntity();
scope.Add(item);
item.filed1 = 50; <-- When change field, event start

private void Scope_ContainedDataChanged(object sender, EventArgs e)
{
    // Here enter twice with same sender end eventargs
}


Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 28-Mar-2018 09:23:30   
Frans Bouma | Lead developer LLBLGen Pro
daniele
User
Posts: 12
Joined: 05-Feb-2010
# Posted on: 28-Mar-2018 09:27:46   

Sorry too hurry smile

Entity is very simple with 3 field:

Id long filed1 string field2 int

LLBLGen Pro 5.3 (5.3.3) RTM Target Language: c# Target Platform: .NET 4.6.1 Template SD.Presets.Adapter.General

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 28-Mar-2018 15:05:47   

Looks like the scope binds to the propertychanged event twice, it's raised once inside the entity. Looking into it.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 28-Mar-2018 16:03:13   

Fixed. Available in new 5.3.5 hotfix build now available.

Frans Bouma | Lead developer LLBLGen Pro