Add stubs for some NET 4.5 ThreadLocal ctors/methods.
authorZoltan Varga <vargaz@gmail.com>
Thu, 7 Mar 2013 01:14:11 +0000 (02:14 +0100)
committerZoltan Varga <vargaz@gmail.com>
Thu, 7 Mar 2013 01:14:11 +0000 (02:14 +0100)
mcs/class/corlib/System.Threading/ThreadLocal.cs

index 50c80e2947e2adad5e107966c28ab23c4941c989..92d0154c83027d538b00212580dba028340dd93b 100644 (file)
@@ -27,6 +27,7 @@
 
 #if NET_4_0
 using System;
+using System.Collections.Generic;
 using System.Runtime.Serialization;
 using System.Runtime.InteropServices;
 using System.Security.Permissions;
@@ -69,6 +70,18 @@ namespace System.Threading
                        this.valueFactory = valueFactory;
                }
 
+#if NET_4_5
+               public ThreadLocal (bool trackAllValues) : this () {
+                       if (trackAllValues)
+                               throw new NotImplementedException ();
+               }
+
+               public ThreadLocal (Func<T> valueFactory, bool trackAllValues) : this (valueFactory) {
+                       if (trackAllValues)
+                               throw new NotImplementedException ();
+               }
+#endif
+
                public void Dispose ()
                {
                        Dispose (true);
@@ -139,7 +152,17 @@ namespace System.Threading
                                tlsdata.data = value;
                        }
                }
-               
+
+#if NET_4_5
+               public IList<T> Values {
+                       get {
+                               if (tls_offset == 0)
+                                       throw new ObjectDisposedException ("ThreadLocal object");
+                               throw new NotImplementedException ();
+                       }
+               }
+#endif
+
                public override string ToString ()
                {
                        return string.Format ("[ThreadLocal: IsValueCreated={0}, Value={1}]", IsValueCreated, Value);