Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@@ -33,9 +33,7 @@ using System.Runtime.InteropServices;
using System.Runtime.ConstrainedExecution;
using System.Security.Cryptography;
using System.Security.Permissions;
#if NET_4_0
using System.Runtime.ExceptionServices;
#endif
namespace System.Security {
@@ -91,9 +89,7 @@ namespace System.Security {
}
}
#if NET_4_0
[HandleProcessCorruptedStateExceptions]
#endif
public void AppendChar (char c)
{
if (disposed)
@@ -150,9 +146,7 @@ namespace System.Security {
length = 0;
}
#if NET_4_0
[HandleProcessCorruptedStateExceptions]
#endif
public void InsertAt (int index, char c)
{
if (disposed)
@@ -194,9 +188,7 @@ namespace System.Security {
read_only = true;
}
#if NET_4_0
[HandleProcessCorruptedStateExceptions]
#endif
public void RemoveAt (int index)
{
if (disposed)
@@ -218,9 +210,7 @@ namespace System.Security {
}
}
#if NET_4_0
[HandleProcessCorruptedStateExceptions]
#endif
public void SetAt (int index, char c)
{
if (disposed)

View File

@@ -34,9 +34,7 @@ using System.Threading;
namespace System.Security {
public sealed class SecurityContext
#if NET_4_0
: IDisposable
#endif
{
private bool _capture;
private IntPtr _winid;
@@ -89,11 +87,9 @@ namespace System.Security {
return capture;
}
#if NET_4_0
public void Dispose ()
{
}
#endif
// internal stuff

View File

@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_4_0
namespace System.Security {
@@ -36,4 +35,3 @@ namespace System.Security {
}
}
#endif

View File

@@ -43,17 +43,10 @@ namespace System.Security {
#else
[MonoTODO ("Only supported by the runtime when CoreCLR is enabled")]
#if NET_4_0
[AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct |
AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method |
AttributeTargets.Field | AttributeTargets.Interface | AttributeTargets.Delegate,
AllowMultiple=false, Inherited=false)]
#else
[AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct |
AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event |
AttributeTargets.Field | AttributeTargets.Interface | AttributeTargets.Delegate,
AllowMultiple=false, Inherited=false)]
#endif
public sealed class SecurityCriticalAttribute : Attribute {
private SecurityCriticalScope _scope;
@@ -78,9 +71,7 @@ namespace System.Security {
}
}
#if NET_4_0
[Obsolete]
#endif
public SecurityCriticalScope Scope {
get { return _scope; }
}

View File

@@ -28,9 +28,7 @@
namespace System.Security {
#if NET_4_0
[Obsolete]
#endif
public enum SecurityCriticalScope {
Explicit,
Everything

View File

@@ -70,9 +70,7 @@ namespace System.Security {
// properties
#if NET_4_0
[Obsolete]
#endif
extern public static bool CheckExecutionRights {
[MethodImplAttribute (MethodImplOptions.InternalCall)]
get;
@@ -117,9 +115,7 @@ namespace System.Security {
origin = new ArrayList ();
}
#if NET_4_0
[Obsolete]
#endif
public static bool IsGranted (IPermission perm)
{
if (perm == null)
@@ -220,9 +216,7 @@ namespace System.Security {
return null;
}
#if NET_4_0
[Obsolete]
#endif
[SecurityPermission (SecurityAction.Demand, ControlPolicy = true)]
public static PolicyLevel LoadPolicyLevelFromFile (string path, PolicyLevelType type)
{
@@ -240,9 +234,7 @@ namespace System.Security {
return pl;
}
#if NET_4_0
[Obsolete]
#endif
[SecurityPermission (SecurityAction.Demand, ControlPolicy = true)]
public static PolicyLevel LoadPolicyLevelFromString (string str, PolicyLevelType type)
{
@@ -260,18 +252,14 @@ namespace System.Security {
return pl;
}
#if NET_4_0
[Obsolete]
#endif
[SecurityPermission (SecurityAction.Demand, ControlPolicy = true)]
public static IEnumerator PolicyHierarchy ()
{
return Hierarchy;
}
#if NET_4_0
[Obsolete]
#endif
public static PermissionSet ResolvePolicy (Evidence evidence)
{
// no evidence, no permission
@@ -293,9 +281,7 @@ namespace System.Security {
return ps;
}
#if NET_4_0
[Obsolete]
#endif
[MonoTODO ("(2.0) more tests are needed")]
public static PermissionSet ResolvePolicy (Evidence[] evidences)
{
@@ -312,9 +298,7 @@ namespace System.Security {
return ps;
}
#if NET_4_0
[Obsolete]
#endif
public static PermissionSet ResolveSystemPolicy (Evidence evidence)
{
// no evidence, no permission
@@ -338,9 +322,7 @@ namespace System.Security {
static private SecurityPermission _execution = new SecurityPermission (SecurityPermissionFlag.Execution);
#if NET_4_0
[Obsolete]
#endif
public static PermissionSet ResolvePolicy (Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, out PermissionSet denied)
{
PermissionSet resolved = ResolvePolicy (evidence);
@@ -375,9 +357,7 @@ namespace System.Security {
return resolved;
}
#if NET_4_0
[Obsolete]
#endif
public static IEnumerator ResolvePolicyGroups (Evidence evidence)
{
if (evidence == null)
@@ -394,9 +374,7 @@ namespace System.Security {
return al.GetEnumerator ();
}
#if NET_4_0
[Obsolete]
#endif
[SecurityPermission (SecurityAction.Demand, ControlPolicy = true)]
public static void SavePolicy ()
{
@@ -407,9 +385,7 @@ namespace System.Security {
}
}
#if NET_4_0
[Obsolete]
#endif
[SecurityPermission (SecurityAction.Demand, ControlPolicy = true)]
public static void SavePolicyLevel (PolicyLevel level)
{
@@ -787,7 +763,6 @@ namespace System.Security {
}
#pragma warning restore 169
#if NET_4_0
public static PermissionSet GetStandardSandbox (Evidence evidence)
{
if (evidence == null)
@@ -800,7 +775,6 @@ namespace System.Security {
{
throw new NotImplementedException ();
}
#endif
}
}

View File

@@ -55,9 +55,7 @@ namespace System.Security {
// properties
#if NET_4_0
[Obsolete]
#endif
public static bool CheckExecutionRights {
get { return false; }
set { ; }
@@ -91,93 +89,71 @@ namespace System.Security {
origin = new ArrayList ();
}
#if NET_4_0
[Obsolete]
#endif
public static bool IsGranted (IPermission perm)
{
return true;
}
#if NET_4_0
[Obsolete]
#endif
[SecurityPermission (SecurityAction.Demand, ControlPolicy = true)]
public static PolicyLevel LoadPolicyLevelFromFile (string path, PolicyLevelType type)
{
throw new NotSupportedException ();
}
#if NET_4_0
[Obsolete]
#endif
[SecurityPermission (SecurityAction.Demand, ControlPolicy = true)]
public static PolicyLevel LoadPolicyLevelFromString (string str, PolicyLevelType type)
{
throw new NotSupportedException ();
}
#if NET_4_0
[Obsolete]
#endif
[SecurityPermission (SecurityAction.Demand, ControlPolicy = true)]
public static IEnumerator PolicyHierarchy ()
{
throw new NotSupportedException ();
}
#if NET_4_0
[Obsolete]
#endif
public static PermissionSet ResolvePolicy (Evidence evidence)
{
throw new NotSupportedException ();
}
#if NET_4_0
[Obsolete]
#endif
public static PermissionSet ResolvePolicy (Evidence[] evidences)
{
throw new NotSupportedException ();
}
#if NET_4_0
[Obsolete]
#endif
public static PermissionSet ResolveSystemPolicy (Evidence evidence)
{
throw new NotSupportedException ();
}
#if NET_4_0
[Obsolete]
#endif
public static PermissionSet ResolvePolicy (Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, out PermissionSet denied)
{
throw new NotSupportedException ();
}
#if NET_4_0
[Obsolete]
#endif
public static IEnumerator ResolvePolicyGroups (Evidence evidence)
{
throw new NotSupportedException ();
}
#if NET_4_0
[Obsolete]
#endif
[SecurityPermission (SecurityAction.Demand, ControlPolicy = true)]
public static void SavePolicy ()
{
throw new NotSupportedException ();
}
#if NET_4_0
[Obsolete]
#endif
[SecurityPermission (SecurityAction.Demand, ControlPolicy = true)]
public static void SavePolicyLevel (PolicyLevel level)
{
@@ -231,7 +207,6 @@ namespace System.Security {
throw new NotSupportedException ();
}
#if NET_4_0
public static PermissionSet GetStandardSandbox (Evidence evidence)
{
if (evidence == null)
@@ -244,8 +219,7 @@ namespace System.Security {
{
throw new NotImplementedException ();
}
#endif
}
}
#endif
#endif

View File

@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_4_0
namespace System.Security {
@@ -38,4 +37,3 @@ namespace System.Security {
}
}
#endif

View File

@@ -26,7 +26,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_4_0
namespace System.Security {
@@ -44,4 +43,3 @@ namespace System.Security {
}
}
#endif