2 using System.Reflection;
4 using System.Security.Permissions;
6 public interface IProgram {
8 [StrongNameIdentityPermission (SecurityAction.InheritanceDemand, PublicKey="0024000004800000940000000602000000240000525341310004000011000000db294bcb78b7361ed6eb5656b612ce266fc81da8c8c6cb04116fc29b5e1d09a02f6c0f387f6d97a1ce9bdbbeb2d874832ae2d2971e70144ea039c710dccab5fb0a36cb14268a83c9b435c1e7318e7915518b68c8ed056b104e76166d6cabe9b77383f26bcf6a0a0b09d04f37b2a407b47d39421a34f2fbc6e6701a1d5c2e8cbb")]
12 public class Program : IProgram {
14 static bool IsSigned ()
16 AssemblyName an = Assembly.GetExecutingAssembly ().GetName ();
17 return (an.GetPublicKey () != null);
24 rc = IsSigned () ? 0 : 1;
25 Console.WriteLine ("*{0}* AbstractProgram", rc);
28 public int InstanceTest ()
35 return new Program ().InstanceTest ();
43 catch (SecurityException se) {
44 // if unsigned the SecurityException will be unhandled
45 Console.WriteLine ("*1* Unexpected SecurityException\n{0}", se);
49 Console.WriteLine ("*2* Unexpected Exception\n{0}", e);