diff options
author | Marek Safar <marek.safar@gmail.com> | 2011-04-20 15:41:29 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2011-04-20 15:41:29 +0400 |
commit | 0781122a85740dc9a0ecf8183b15c4785843aac3 (patch) | |
tree | 3edff6eef764cd3b9f32d9e458eb92b1dcaf1982 /mcs/class/corlib/System.Threading/ExecutionContext.cs | |
parent | 57bcdb9d97df8f9201284e06ad1007889b649b03 (diff) |
Add missing 4.0 api
Diffstat (limited to 'mcs/class/corlib/System.Threading/ExecutionContext.cs')
-rw-r--r-- | mcs/class/corlib/System.Threading/ExecutionContext.cs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mcs/class/corlib/System.Threading/ExecutionContext.cs b/mcs/class/corlib/System.Threading/ExecutionContext.cs index 684caf0a2e4..32e729c1de1 100644 --- a/mcs/class/corlib/System.Threading/ExecutionContext.cs +++ b/mcs/class/corlib/System.Threading/ExecutionContext.cs @@ -35,7 +35,11 @@ using System.Security.Permissions; namespace System.Threading { [Serializable] - public sealed class ExecutionContext : ISerializable { + public sealed class ExecutionContext : ISerializable +#if NET_4_0 + , IDisposable +#endif + { #if !MOONLIGHT private SecurityContext _sc; #endif @@ -83,6 +87,14 @@ namespace System.Threading { return new ExecutionContext (this); } + +#if NET_4_0 + public void Dispose () + { + if (_sc != null) + _sc.Dispose (); + } +#endif [MonoTODO] [ReflectionPermission (SecurityAction.Demand, MemberAccess = true)] |