CslaDataProvider.CreateHandler() bug

CslaDataProvider.CreateHandler() bug

Old forum URL: forums.lhotka.net/forums/t/5665.aspx


Ash002 posted on Thursday, October 23, 2008

Hi All

Extending CslaDataProvider causes CreateHandler() to fail on the line

      MethodInfo method = this.GetType().GetMethod("QueryCompleted", BindingFlags.Instance | BindingFlags.NonPublic);

as QueryCompleted() is private. Can fix?

Thanks in advance

Ashley

ajj3085 replied on Friday, October 24, 2008

BindingFlags.NonPublic means it should find private members.  Perhaps it's not searching the inheritance hierarchy though?

sergeyb replied on Friday, October 24, 2008

Yes, I think it is missing FlattenHierarchy binding flag.  I will try to fix it today.

 

Sergey Barskiy

Principal Consultant

office: 678.405.0687 | mobile: 404.388.1899

cid:_2_0648EA840648E85C001BBCB886257279
Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: ajj3085 [mailto:cslanet@lhotka.net]
Sent: Friday, October 24, 2008 8:20 AM
To: Sergey Barskiy
Subject: Re: [CSLA .NET] CslaDataProvider.CreateHandler() bug

 

BindingFlags.NonPublic means it should find private members.  Perhaps it's not searching the inheritance hierarchy though?


sergeyb replied on Friday, October 24, 2008

This has been fixed in the latest source code.  Unit tests have also been added for this use case.  If you need the fix right now, you can grab it from SVN.  You will need two files: CslaDateProvider and MethodCaller.  If not, it will be available in the next release of 3.6.

 

Thanks for reporting this, Ashley.

 

Sergey Barskiy

Principal Consultant

office: 678.405.0687 | mobile: 404.388.1899

Magenic ®

Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: Ash002 [mailto:cslanet@lhotka.net]
Sent: Thursday, October 23, 2008 10:50 PM
To: Sergey Barskiy
Subject: [CSLA .NET] CslaDataProvider.CreateHandler() bug

 

Hi All

Extending CslaDataProvider causes CreateHandler() to fail on the line

      MethodInfo method = this.GetType().GetMethod("QueryCompleted", BindingFlags.Instance | BindingFlags.NonPublic);

as QueryCompleted() is private. Can fix?

Thanks in advance

Ashley



Ash002 replied on Sunday, October 26, 2008

Thanks guys, great service!!

Copyright (c) Marimer LLC