#if NET_4_0
using System;
+using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Runtime.InteropServices;
using System.Security.Permissions;
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);
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);