I realize this attribute does force the particular emittion and does not
remain in metadata, and I understand the CLR already does the permission
checks.  I was hoping there was some way to discover these members via
reflection however.  The need arose purely from maintenance and external
documentation purposes - to easily be able to identify public/protected
members which were in fact restricted from public consumption.

Thanks

-----Original Message-----
From: Damon Squires [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 04, 2004 1:23 PM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] LinkDemand discoverability

This is a pseudo attribute. The compiler injects the code and removes The
attribute. You won't be able to use reflection to retrieve it.

-----Original Message-----
From: Moderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Adam Sills
Sent: Thursday, March 04, 2004 2:03 PM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] LinkDemand discoverability

You shouldn't need to assert/demand those permissions when invoking a member
marked with it, since the framework already does it (i.e., it guarantees that
those permissions are checked no matter how it is invoked).

Adam..

> -----Original Message-----
> From: Moderated discussion of advanced .NET topics. [mailto:ADVANCED- 
> [EMAIL PROTECTED] On Behalf Of Xavier Musy
> Sent: Thursday, March 04, 2004 12:26 PM
> To: [EMAIL PROTECTED]
> Subject: [ADVANCED-DOTNET] LinkDemand discoverability
>
> I'm trying to dynamically discover (using reflection) 
> types/methods/properties marked with a 
> StrongNameIdentityPermissionAttribute
> with a SecurityAction.LinkDemand as the action.
>
> It appears that MemberInfo.GetCustomAttributes() does not return 
> StrongNameIdentityPermissionAttribute objects.  Looking at the IL
emitted
> by
> having a member marked with such an attribute, it would appear a 
> PermissionSet is used.  However, I'm not sure how that helps me given
I
> can't
> Assert/Demand those permissions per reflected member (Hence I'm not
seeing
> how StrongNameIdentityPermission nor StrongNameMembershipCondition
would
> help
> here).
>
> Anyone know how to do this?

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com Some .NET
courses you may be interested in:

NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com Some .NET
courses you may be interested in:

NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to