dimanche 2 février 2020

How to obtain constructor values for SecurityPermissionAttribute via reflection

I'm trying to obtain the arguments for the SecurityPermissionAttribute but nothing returns during reflection. Can't seem to get the "SecurityAction.Demand, ControlThread=true" values

I'm using the reflection only load context:

MethodBase.GetCustomAttributesData()

running against: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll

Class: System.Threading.Thread System.Threading.Thread

[System.Security.SecuritySafeCritical] // auto-generated [Obsolete("Thread.Suspend has been deprecated. Please use other classes in System.Threading, such as Monitor, Mutex, Event, and Semaphore, to synchronize Threads or protect resources. http://go.microsoft.com/fwlink/?linkid=14202", false)][SecurityPermission(SecurityAction.Demand, ControlThread=true)] [SecurityPermission(SecurityAction.Demand, ControlThread=true)] public void Suspend() { SuspendInternal(); }





Aucun commentaire:

Enregistrer un commentaire