For #3 - it is probably the same reason that the no parameter version of CanReadProperty was made obsolete. They relied on walking a stack trace to locate the property name for you. It turns out that is unreliable. So you have to provide the name in your code.
Joe
string methodName = new System.Diagnostics.StackTrace().GetFrame(1).GetMethod().Name.Substring(4);
Correct, this code is not reliable. It may work most of the
time, but not 100 % of the time.
Sergey Barskiy
Principal Consultant
office: 678.405.0687 |
mobile: 404.388.1899
Microsoft Worldwide Partner of the Year | Custom
Development Solutions, Technical Innovation
From: FrankM
[mailto:cslanet@lhotka.net]
Sent: Thursday, October 02, 2008 4:38 PM
To: Sergey Barskiy
Subject: Re: [CSLA .NET] Questions about AuthorizationRules.AllowExecute
Thanks Joe, that means the code shown in another post is not
stable?
string methodName = new
System.Diagnostics.StackTrace().GetFrame(1).GetMethod().Name.Substring(4);
Copyright (c) Marimer LLC