namespace System.Security {
-#if NET_2_0
[ComVisible (true)]
-#endif
[AttributeUsage (AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)]
public sealed class AllowPartiallyTrustedCallersAttribute : Attribute {
[Serializable]
[SecurityPermission (SecurityAction.InheritanceDemand, ControlEvidence = true, ControlPolicy = true)]
-#if NET_2_0
[ComVisible (true)]
-#endif
[MonoTODO ("CAS support is experimental (and unsupported).")]
public abstract class CodeAccessPermission : IPermission, ISecurityEncodable, IStackWalk {
new PermissionSet (this).Deny ();
}
-#if NET_2_0
[ComVisible (false)]
public override bool Equals (object obj)
{
CodeAccessPermission cap = (obj as CodeAccessPermission);
return (IsSubsetOf (cap) && cap.IsSubsetOf (this));
}
-#endif
public abstract void FromXml (SecurityElement elem);
-#if NET_2_0
[ComVisible (false)]
public override int GetHashCode ()
{
return base.GetHashCode ();
}
-#endif
public abstract IPermission Intersect (IPermission target);
case PermissionState.None:
break;
case PermissionState.Unrestricted:
-#if NET_2_0
// unrestricted permissions are possible for identiy permissions
-#else
- if (!allowUnrestricted) {
- msg = Locale.GetText ("Unrestricted isn't not allowed for identity permissions.");
- throw new ArgumentException (msg, "state");
- }
-#endif
break;
default:
msg = String.Format (Locale.GetText ("Invalid enum {0}"), state);
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
}
}
}
-
-#endif
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System.Reflection;
using System.Runtime.Hosting;
using System.Runtime.InteropServices;
}
}
}
-
-#endif
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System.Runtime.InteropServices;
namespace System.Security {
AllFlags = HostAppDomainEvidence | HostPolicyLevel | HostAssemblyEvidence | HostDetermineApplicationTrust | HostResolvePolicy
}
}
-
-#endif
namespace System.Security {
-#if NET_2_0
[ComVisible (true)]
-#endif
public interface IEvidenceFactory {
Evidence Evidence { get; }
}
namespace System.Security {
-#if NET_2_0
[ComVisible (true)]
-#endif
#if NET_2_1 && !MONOTOUCH
public interface IPermission {
#else
namespace System.Security {
-#if NET_2_0
[ComVisible (true)]
-#endif
public interface ISecurityEncodable {
void FromXml (SecurityElement e);
namespace System.Security {
-#if NET_2_0
[ComVisible (true)]
-#endif
public interface ISecurityPolicyEncodable {
void FromXml (SecurityElement e, PolicyLevel level);
namespace System.Security {
-#if NET_2_0
[ComVisible (true)]
-#endif
public interface IStackWalk {
void Assert ();
namespace System.Security {
-#if NET_2_0
[ComVisible (true)]
-#endif
[Serializable]
public sealed class NamedPermissionSet : PermissionSet {
return se;
}
-#if NET_2_0
[ComVisible (false)]
public override bool Equals (object obj)
{
// description is never part of the hash code
return hc;
}
-#endif
}
}
namespace System.Security {
-#if NET_2_0
internal static class PermissionBuilder {
-#else
- internal class PermissionBuilder {
-#endif
private static object[] psNone = new object [1] { PermissionState.None };
// can be used to create an empty or an unrestricted permission from any valid type
Type classType = Type.GetType (fullname);
if (classType == null) {
string msg = Locale.GetText ("Can't create an instance of permission class {0}.");
-#if NET_2_0
throw new TypeLoadException (String.Format (msg, fullname));
-#else
- throw new ArgumentException (String.Format (msg, fullname));
-#endif
}
IPermission p = Create (classType);
p.FromXml (se);
[Serializable]
// Microsoft public key - i.e. only MS signed assembly can inherit from PermissionSet (1.x) or (2.0) FullTrust assemblies
[StrongNameIdentityPermission (SecurityAction.InheritanceDemand, PublicKey="002400000480000094000000060200000024000052534131000400000100010007D1FA57C4AED9F0A32E84AA0FAEFD0DE9E8FD6AEC8F87FB03766C834C99921EB23BE79AD9D5DCC1DD9AD236132102900B723CF980957FC4E177108FC607774F29E8320E92EA05ECE4E821C0A5EFE8F1645C4C0C93C1AB99285D622CAA652C1DFAD63D745D6F2DE5F17E5EAF0FC4963D261C8A12436518206DC093344D5AD293")]
-#if NET_2_0
[ComVisible (true)]
-#endif
[MonoTODO ("CAS support is experimental (and unsupported).")]
public class PermissionSet: ISecurityEncodable, ICollection, IEnumerable, IStackWalk, IDeserializationCallback {
foreach (IPermission p in permSet.list)
list.Add (p);
}
-#if !NET_2_0
- else {
- state = PermissionState.Unrestricted;
- }
-#endif
}
internal PermissionSet (string xml)
// methods
-#if NET_2_0
public IPermission AddPermission (IPermission perm)
-#else
- public virtual IPermission AddPermission (IPermission perm)
-#endif
{
if ((perm == null) || _readOnly)
return perm;
// we don't add to an unrestricted permission set unless...
if (state == PermissionState.Unrestricted) {
-#if NET_2_0
// identity permissions can be unrestricted under 2.x
{
-#else
- // we're adding identity permission as they don't support unrestricted
- if (perm is IUnrestrictedPermission) {
-#endif
// we return the union of the permission with unrestricted
// which results in a permission of the same type initialized
// with PermissionState.Unrestricted
[MonoTODO ("CAS support is experimental (and unsupported). Imperative mode is not implemented.")]
[SecurityPermission (SecurityAction.Demand, Assertion = true)]
-#if NET_2_0
public void Assert ()
-#else
- public virtual void Assert ()
-#endif
{
int count = this.Count;
}
}
-#if NET_2_0
public void Demand ()
-#else
- public virtual void Demand ()
-#endif
{
// Note: SecurityEnabled only applies to CAS permissions
// so we're not checking for it (yet)
}
[MonoTODO ("CAS support is experimental (and unsupported). Imperative mode is not implemented.")]
-#if NET_2_0
public void Deny ()
-#else
- public virtual void Deny ()
-#endif
{
if (!SecurityManager.SecurityEnabled)
return;
if (CodeAccessPermission.IsUnrestricted (et)) {
state = PermissionState.Unrestricted;
-#if NET_2_0
// no need to continue for an unrestricted permission
// because identity permissions now "supports" unrestricted
return;
-#endif
} else {
state = PermissionState.None;
}
}
}
-#if NET_2_0
public IEnumerator GetEnumerator ()
-#else
- public virtual IEnumerator GetEnumerator ()
-#endif
{
return list.GetEnumerator ();
}
-#if NET_2_0
public bool IsSubsetOf (PermissionSet target)
{
// if target is empty we must be empty too
return true;
if (this.IsUnrestricted ())
return false;
-#else
- public virtual bool IsSubsetOf (PermissionSet target)
- {
-#endif
+
if (this.IsUnrestricted () && ((target == null) || !target.IsUnrestricted ()))
return false;
// if each of our permission is (a) present and (b) a subset of target
foreach (IPermission p in list) {
-#if !NET_2_0
- if (target == null) {
- if (!p.IsSubsetOf (null))
- return false;
- } else
-#endif
- {
- // non CAS permissions must be evaluated for unrestricted
- Type t = p.GetType ();
- IPermission i = null;
- if (target.IsUnrestricted () && (p is CodeAccessPermission) && (p is IUnrestrictedPermission)) {
- i = (IPermission) Activator.CreateInstance (t, psUnrestricted);
- } else {
- i = target.GetPermission (t);
- }
-
- if (!p.IsSubsetOf (i))
- return false; // not a subset (condition b)
+ // non CAS permissions must be evaluated for unrestricted
+ Type t = p.GetType ();
+ IPermission i = null;
+ if (target.IsUnrestricted () && (p is CodeAccessPermission) && (p is IUnrestrictedPermission)) {
+ i = (IPermission) Activator.CreateInstance (t, psUnrestricted);
+ } else {
+ i = target.GetPermission (t);
}
+
+ if (!p.IsSubsetOf (i))
+ return false; // not a subset (condition b)
}
return true;
}
[MonoTODO ("CAS support is experimental (and unsupported). Imperative mode is not implemented.")]
-#if NET_2_0
public void PermitOnly ()
-#else
- public virtual void PermitOnly ()
-#endif
{
if (!SecurityManager.SecurityEnabled)
return;
}
else if (outFormat.StartsWith ("XML")) {
string msg = String.Format (Locale.GetText ("Can't convert from {0} to {1}"), inFormat, outFormat);
-#if NET_2_0
throw new XmlSyntaxException (msg);
-#else
- throw new ArgumentException (msg);
-#endif
}
}
else {
throw new SerializationException (String.Format (Locale.GetText ("Unknown output format {0}."), outFormat));
}
-#if NET_2_0
public IPermission GetPermission (Type permClass)
-#else
- public virtual IPermission GetPermission (Type permClass)
-#endif
{
if ((permClass == null) || (list.Count == 0))
return null;
return null;
}
-#if NET_2_0
public PermissionSet Intersect (PermissionSet other)
-#else
- public virtual PermissionSet Intersect (PermissionSet other)
-#endif
{
// no intersection possible
if ((other == null) || (other.IsEmpty ()) || (this.IsEmpty ()))
state = PermissionState.Unrestricted;
PermissionSet interSet = null;
-#if NET_2_0
// much simpler with 2.0
if (state == PermissionState.Unrestricted) {
interSet = new PermissionSet (state);
interSet = new PermissionSet (state);
InternalIntersect (interSet, this, other, false);
}
-#else
- interSet = new PermissionSet (state);
- if (state == PermissionState.Unrestricted) {
- InternalIntersect (interSet, this, other, true);
- InternalIntersect (interSet, other, this, true);
- } else if (this.IsUnrestricted ()) {
- InternalIntersect (interSet, this, other, true);
- } else if (other.IsUnrestricted ()) {
- InternalIntersect (interSet, other, this, true);
- } else {
- InternalIntersect (interSet, this, other, false);
- }
-#endif
return interSet;
}
// add intersection for this type
intersect.AddPermission (p.Intersect (i));
}
-#if NET_2_0
// unrestricted is possible for indentity permissions
else if (unrestricted) {
-#else
- else if (unrestricted && (p is IUnrestrictedPermission)) {
-#endif
intersect.AddPermission (p);
}
// or reject!
}
}
-#if NET_2_0
public bool IsEmpty ()
-#else
- public virtual bool IsEmpty ()
-#endif
{
// note: Unrestricted isn't empty
if (state == PermissionState.Unrestricted)
return true;
}
-#if NET_2_0
public bool IsUnrestricted ()
-#else
- public virtual bool IsUnrestricted ()
-#endif
{
return (state == PermissionState.Unrestricted);
}
-#if NET_2_0
public IPermission RemovePermission (Type permClass)
-#else
- public virtual IPermission RemovePermission (Type permClass)
-#endif
{
if ((permClass == null) || _readOnly)
return null;
return null;
}
-#if NET_2_0
public IPermission SetPermission (IPermission perm)
-#else
- public virtual IPermission SetPermission (IPermission perm)
-#endif
{
if ((perm == null) || _readOnly)
return perm;
-#if NET_2_0
IUnrestrictedPermission u = (perm as IUnrestrictedPermission);
if (u == null) {
state = PermissionState.None;
} else {
state = u.IsUnrestricted () ? state : PermissionState.None;
}
-#else
- if (perm is IUnrestrictedPermission)
- state = PermissionState.None;
-#endif
RemovePermission (perm.GetType ());
list.Add (perm);
return perm;
return se;
}
-#if NET_2_0
public PermissionSet Union (PermissionSet other)
-#else
- public virtual PermissionSet Union (PermissionSet other)
-#endif
{
if (other == null)
return this.Copy ();
PermissionSet copy = null;
if (this.IsUnrestricted () || other.IsUnrestricted ()) {
-#if NET_2_0
// there are no child elements in unrestricted permission sets
return new PermissionSet (PermissionState.Unrestricted);
-#else
- copy = this.Copy ();
- // so we keep the "right" type (e.g. NamedPermissionSet)
- copy.Clear ();
- copy.state = PermissionState.Unrestricted;
- // copy all permissions that do not implement IUnrestrictedPermission
- foreach (IPermission p in this.list) {
- if (!(p is IUnrestrictedPermission))
- copy.AddPermission (p);
- }
- foreach (IPermission p in other.list) {
- if (!(p is IUnrestrictedPermission))
- copy.AddPermission (p);
- }
-#endif
} else {
copy = this.Copy ();
// PermissionState.None -> copy all permissions
{
}
-#if NET_2_0
[ComVisible (false)]
public override bool Equals (object obj)
{
{
CodeAccessPermission.RevertAssert ();
}
-#endif
// internal
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System.Collections;
using System.Runtime.InteropServices;
using System.Security.Permissions;
}
}
-#endif
namespace System.Security {
[Serializable]
-#if NET_2_0
[ComVisible (true)]
-#endif
public enum PolicyLevelType {
User = 0x0,
Machine,
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System.Globalization;
using System.Reflection;
using System.Runtime.CompilerServices;
}
}
}
-
-#endif
namespace System.Security {
-#if NET_2_0
public sealed class SecurityContext {
-#else
- internal sealed class SecurityContext {
-#endif
private bool _capture;
private IntPtr _winid;
private CompressedStack _stack;
sc.FlowSuppressed = false;
sc.WindowsIdentityFlowSuppressed = false;
}
-#if NET_2_0
+
// if you got the context then you can use it
[SecurityPermission (SecurityAction.Assert, ControlPrincipal = true)]
[SecurityPermission (SecurityAction.LinkDemand, Infrastructure = true)]
Thread.CurrentPrincipal = original;
}
}
-#endif
+
[SecurityPermission (SecurityAction.LinkDemand, Infrastructure = true)]
static public AsyncFlowControl SuppressFlow ()
{
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
using System;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
#endif
}
}
-
-#endif
}
}
-#elif NET_2_0
+#else
[MonoTODO ("Only supported by the runtime when CoreCLR is enabled")]
[AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct |
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
namespace System.Security {
public enum SecurityCriticalScope {
}
}
-#endif
namespace System.Security {
-#if NET_2_0
[ComVisible (true)]
-#endif
[Serializable]
public sealed class SecurityElement
{
return ((sa == null) ? null : sa.Value);
}
-#if NET_2_0
[ComVisible (false)]
public SecurityElement Copy ()
{
return new SecurityElement (this);
}
-#endif
public bool Equal (SecurityElement other)
{
return sb.ToString ();
}
-#if NET_2_0
- public
-#else
- internal
-#endif
- static SecurityElement FromString (string xml)
+ public static SecurityElement FromString (string xml)
{
if (xml == null)
throw new ArgumentNullException ("xml");
private void ToXml (ref StringBuilder s, int level)
{
-#if ! NET_2_0
- s.Append (' ', level * 3);
-#endif
s.Append ("<");
s.Append (tag);
if (attributes != null) {
-#if NET_2_0
s.Append (" ");
-#endif
for (int i=0; i < attributes.Count; i++) {
SecurityAttribute sa = (SecurityAttribute) attributes [i];
-#if ! NET_2_0
- s.Append (" ");
- // all other attributes must align with the first one
- if (i != 0)
- s.Append (' ', (level * 3) + tag.Length + 1);
-#endif
s.Append (sa.Name)
.Append ("=\"")
.Append (Escape (sa.Value))
namespace System.Security {
[Serializable]
-#if NET_2_0
- [ComVisible (true)]
-#endif
+ [ComVisible (true)]
public class SecurityException : SystemException {
// Fields
string permissionState;
private MethodInfo _method;
private Evidence _evidence;
-#if !NET_2_0
- #pragma warning disable 169
-#endif
private SecurityAction _action;
private object _denyset;
private object _permitset;
private string _url;
private SecurityZone _zone;
-#if !NET_2_0
- #pragma warning restore 169
-#endif
-
// Properties
-#if NET_2_0
[ComVisible (false)]
public SecurityAction Action {
get { return _action; }
get { return _zone; }
set { _zone = value; }
}
-#endif
-#if NET_2_0
[ComVisible (false)]
- public
-#else
- internal
-#endif
- object Demanded {
+ public object Demanded {
[SecurityPermission (SecurityAction.Demand, ControlEvidence=true, ControlPolicy=true)]
get { return _demanded; }
set { _demanded = value; }
}
-#if NET_2_0
- public
-#else
- internal
-#endif
- IPermission FirstPermissionThatFailed {
+ public IPermission FirstPermissionThatFailed {
[SecurityPermission (SecurityAction.Demand, ControlEvidence=true, ControlPolicy=true)]
get { return _firstperm; }
set { _firstperm = value; }
public string PermissionState {
[SecurityPermission (SecurityAction.Demand, ControlEvidence=true, ControlPolicy=true)]
get { return permissionState; }
-#if NET_2_0
set { permissionState = value; }
-#endif
}
public Type PermissionType {
get { return permissionType; }
-#if NET_2_0
set { permissionType = value; }
-#endif
}
-#if NET_1_1
public string GrantedSet {
[SecurityPermission (SecurityAction.Demand, ControlEvidence=true, ControlPolicy=true)]
get { return _granted; }
-#if NET_2_0
set { _granted = value; }
-#endif
}
public string RefusedSet {
[SecurityPermission (SecurityAction.Demand, ControlEvidence=true, ControlPolicy=true)]
get { return _refused; }
-#if NET_2_0
set { _refused = value; }
-#endif
}
-#endif
+
// Constructors
public SecurityException ()
_refused = refused.ToString ();
}
-#if NET_2_0
- public
-#else
- internal
-#endif
- SecurityException (string message, object deny, object permitOnly, MethodInfo method,
+ public SecurityException (string message, object deny, object permitOnly, MethodInfo method,
object demanded, IPermission permThatFailed)
: base (message)
{
_firstperm = permThatFailed;
}
-#if NET_2_0
- public
-#else
- internal
-#endif
- SecurityException (string message, AssemblyName assemblyName, PermissionSet grant,
+ public SecurityException (string message, AssemblyName assemblyName, PermissionSet grant,
PermissionSet refused, MethodInfo method, SecurityAction action, object demanded,
IPermission permThatFailed, Evidence evidence)
: base (message)
public RuntimeDeclSecurityEntry choice;
}
-#if NET_2_0
[ComVisible (true)]
public static class SecurityManager {
-#else
- public sealed class SecurityManager {
-
- private SecurityManager ()
- {
- }
-#endif
private static object _lockObject;
private static ArrayList _hierarchy;
private static IPermission _unmanagedCode;
set;
}
-#if NET_2_0
[Obsolete ("The security manager cannot be turned off on MS runtime")]
-#endif
extern public static bool SecurityEnabled {
[MethodImplAttribute (MethodImplOptions.InternalCall)]
get;
// methods
-#if NET_1_1
// NOTE: This method doesn't show in the class library status page because
// it cannot be "found" with the StrongNameIdentityPermission for ECMA key.
// But it's there!
zone = new ArrayList ();
origin = new ArrayList ();
}
-#endif
public static bool IsGranted (IPermission perm)
{
// - Not affected by overrides (like Assert, Deny and PermitOnly)
// - calls IsSubsetOf even for non CAS permissions
// (i.e. it does call Demand so any code there won't be executed)
-#if NET_2_0
// with 2.0 identity permission are unrestrictable
return IsGranted (Assembly.GetCallingAssembly (), perm);
-#else
- if (perm is IUnrestrictedPermission)
- return IsGranted (Assembly.GetCallingAssembly (), perm);
- else
- return IsGrantedRestricted (Assembly.GetCallingAssembly (), perm);
-#endif
}
-#if !NET_2_0
- // only for permissions that do not implement IUnrestrictedPermission
- internal static bool IsGrantedRestricted (Assembly a, IPermission perm)
+ // note: in 2.0 *all* permissions (including identity permissions) support unrestricted
+ internal static bool IsGranted (Assembly a, IPermission perm)
{
- PermissionSet granted = a.GrantedPermissionSet;\r
- if (granted != null) {\r
+ PermissionSet granted = a.GrantedPermissionSet;
+ if ((granted != null) && !granted.IsUnrestricted ()) {
CodeAccessPermission grant = (CodeAccessPermission) granted.GetPermission (perm.GetType ());
if (!perm.IsSubsetOf (grant)) {
return false;
}
PermissionSet denied = a.DeniedPermissionSet;
- if (denied != null) {\r
+ if ((denied != null) && !denied.IsEmpty ()) {
+ if (denied.IsUnrestricted ())
+ return false;
CodeAccessPermission refuse = (CodeAccessPermission) a.DeniedPermissionSet.GetPermission (perm.GetType ());
if ((refuse != null) && perm.IsSubsetOf (refuse))
return false;
}
return true;
}
-#endif
- // note: in 2.0 *all* permissions (including identity permissions) support unrestricted
- internal static bool IsGranted (Assembly a, IPermission perm)
- {
- PermissionSet granted = a.GrantedPermissionSet;\r
- if ((granted != null) && !granted.IsUnrestricted ()) {\r
- CodeAccessPermission grant = (CodeAccessPermission) granted.GetPermission (perm.GetType ());\r
- if (!perm.IsSubsetOf (grant)) {\r
- return false;\r
- }\r
- }\r
-\r
- PermissionSet denied = a.DeniedPermissionSet;\r
- if ((denied != null) && !denied.IsEmpty ()) {\r
- if (denied.IsUnrestricted ())\r
- return false;\r
- CodeAccessPermission refuse = (CodeAccessPermission) a.DeniedPermissionSet.GetPermission (perm.GetType ());\r
- if ((refuse != null) && perm.IsSubsetOf (refuse))\r
- return false;\r
- }\r
- return true;\r
- }
internal static IPermission CheckPermissionSet (Assembly a, PermissionSet ps, bool noncas)
{
foreach (IPermission p in ps) {
// note: this may contains non CAS permissions
if ((!noncas) && (p is CodeAccessPermission)) {
-#if NET_2_0
if (!IsGranted (a, p))
return p;
-#else
- if (p is IUnrestrictedPermission) {
- if (!IsGranted (a, p))
- return p;
- } else {
- if (!IsGrantedRestricted (a, p))
- return p;
- }
-#endif
} else {
// but non-CAS will throw on failure...
try {
PermissionSet granted = ad.GrantedPermissionSet;
if (granted == null)
return null;
-#if NET_2_0
if (granted.IsUnrestricted ())
return null;
-#else
- if ((granted.Count == 0) && granted.IsUnrestricted ())
- return null;
-#endif
if (ps.IsUnrestricted ())
return new SecurityPermission (SecurityPermissionFlag.NoFlags);
return ps;
}
-#if NET_2_0
[MonoTODO ("(2.0) more tests are needed")]
public static PermissionSet ResolvePolicy (Evidence[] evidences)
{
ResolveIdentityPermissions (ps, evidence);
return ps;
}
-#endif
static private SecurityPermission _execution = new SecurityPermission (SecurityPermissionFlag.Execution);
internal static void ResolveIdentityPermissions (PermissionSet ps, Evidence evidence)
{
-#if NET_2_0
// in 2.0 identity permissions can now be unrestricted
if (ps.IsUnrestricted ())
return;
-#endif
+
// Only host evidence are used for policy resolution
IEnumerator ee = evidence.GetHostEnumerator ();
while (ee.MoveNext ()) {
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
namespace System.Security {
#if !NET_2_1 || MONOTOUCH
}
}
-#endif
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
namespace System.Security {
// available in FX2.0 with service pack 1, including the 2.0 shipped as part of FX3.5
}
}
-#endif
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
namespace System.Security {
#if !NET_2_1 || MONOTOUCH
}
}
}
-
-#endif
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-
namespace System.Security {
[AttributeUsage (AttributeTargets.All, AllowMultiple=false, Inherited=false)]
}
}
}
-
-#endif
namespace System.Security {
[Serializable]
-#if NET_2_0
[ComVisible (true)]
-#endif
public enum SecurityZone {
MyComputer = 0x0,
Intranet,
namespace System.Security {
-#if NET_2_0
[AttributeUsage (AttributeTargets.Class | AttributeTargets.Method |
AttributeTargets.Interface | AttributeTargets.Delegate,
AllowMultiple=true, Inherited=false)]
[ComVisible (true)]
-#else
- [AttributeUsage (AttributeTargets.Class | AttributeTargets.Method |
- AttributeTargets.Interface, AllowMultiple=true, Inherited=false)]
-#endif
public sealed class SuppressUnmanagedCodeSecurityAttribute : Attribute {
}
}
namespace System.Security {
-#if NET_2_0
[ComVisible (true)]
-#endif
[AttributeUsage (AttributeTargets.Module, AllowMultiple=true, Inherited=false)]
public sealed class UnverifiableCodeAttribute : Attribute {
}
namespace System.Security {
[Serializable]
-#if NET_2_0
[ComVisible (true)]
-#endif
public class VerificationException : SystemException {
// Constructors
namespace System.Security {
[Serializable]
-#if NET_2_0
[ComVisible (true)]
-#endif
public sealed class XmlSyntaxException : SystemException {
// Constructors