I need to find information on class security permissions without
creating instance of it.

But following code results  only one attribute :(

Call method :
     foreach( object atr in typeof( SecTest).GetCustomAttributes( true ) )
     {
       System.Diagnostics.Trace.WriteLine( atr.GetType().FullName, t.FullName );
     }
Result :
    TestSecurity.SecTest: System.ComponentModel.DescriptionAttribute

Helper and SecTest classes :
using System;
using System.Security.Permissions;
namespace TestSecurity
{
  [System.ComponentModel.Description("Some test class for security")]  // OK I see 
tihs atribute
  [PrincipalPermission( SecurityAction.Demand, Role="Test")] // this one is hidden :(
  public class SecTest
  {}

}


Mindaugas

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to