+ if (pos_args == null) {
+ var predefined = context.Module.PredefinedAttributes;
+
+ //
+ // BCL defines System.Security.Permissions.HostProtectionAttribute with parameterless
+ // contructor which should not be valid but it's already part of the framework
+ //
+ if (Type == predefined.HostProtection.TypeSpec) {
+ value = new IntConstant (context.Module.Compiler.BuiltinTypes, (int)SecurityAction.LinkDemand, loc);
+ return SecurityAction.LinkDemand;
+ }
+
+ return null;
+ }
+
+ value = (Constant) pos_args [0].Expr;
+ return (SecurityAction) value.GetValue ();