namespace System.Security.Permissions {
-#if NET_2_0
[ComVisible (true)]
-#endif
[AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Class |
AttributeTargets.Struct | AttributeTargets.Constructor |
AttributeTargets.Method, AllowMultiple=true, Inherited=false)]
}
}
+ [Obsolete]
public bool ReflectionEmit
{
get { return reflectionEmit; }
flags -= ReflectionPermissionFlag.ReflectionEmit;
reflectionEmit = value;
}
- }
+ }
+
+ public bool RestrictedMemberAccess
+ {
+ get { return ((flags & ReflectionPermissionFlag.RestrictedMemberAccess) == ReflectionPermissionFlag.RestrictedMemberAccess); }
+ set {
+ if (value)
+ flags |= ReflectionPermissionFlag.RestrictedMemberAccess;
+ else
+ flags -= ReflectionPermissionFlag.RestrictedMemberAccess;
+ }
+ }
-#if NET_2_0
[Obsolete ("not enforced in 2.0+")]
-#endif
public bool TypeInformation
{
get { return typeInfo; }
typeInfo = value;
}
}
-
+
// Methods
public override IPermission CreatePermission ()
{
+#if MOBILE
+ return null;
+#else
ReflectionPermission perm = null;
if (this.Unrestricted)
perm = new ReflectionPermission (PermissionState.Unrestricted);
else
perm = new ReflectionPermission (flags);
return perm;
+#endif
}
}
}