diff options
| author | mo khan <mo.khan@gmail.com> | 2019-10-20 19:47:59 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2019-10-20 19:47:59 -0600 |
| commit | cc4b5d12c761b7322d8db928e5ff485fb8fd06f7 (patch) | |
| tree | 3ec7edde86cedc75f9bf8c6a76d3b1169afcc345 /lib/infrastructure/threading/CurrentThread.cs | |
| parent | 0a7ddbc3baad14ccb2bb2a1069fd13228cf83a58 (diff) | |
Rename gorilla to jive
Diffstat (limited to 'lib/infrastructure/threading/CurrentThread.cs')
| -rw-r--r--[-rwxr-xr-x] | lib/infrastructure/threading/CurrentThread.cs | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/infrastructure/threading/CurrentThread.cs b/lib/infrastructure/threading/CurrentThread.cs index 81e3ae6..75afa12 100755..100644 --- a/lib/infrastructure/threading/CurrentThread.cs +++ b/lib/infrastructure/threading/CurrentThread.cs @@ -1,19 +1,19 @@ -using System.Threading;
-
-namespace gorilla.infrastructure.threading +using System.Threading; + +namespace jive.infrastructure.threading { - public class CurrentThread : ApplicationThread + public class CurrentThread : ApplicationThread + { + public T provide_slot_for<T>() where T : class, new() { - public T provide_slot_for<T>() where T : class, new() - { - var slot = Thread.GetNamedDataSlot(create_key_for<T>()); - if (null == Thread.GetData(slot)) Thread.SetData(slot, new T()); - return (T) Thread.GetData(slot); - } + var slot = Thread.GetNamedDataSlot(create_key_for<T>()); + if (null == Thread.GetData(slot)) Thread.SetData(slot, new T()); + return (T) Thread.GetData(slot); + } - string create_key_for<T>() - { - return Thread.CurrentThread.ManagedThreadId + GetType().FullName + typeof (T).FullName; - } + string create_key_for<T>() + { + return Thread.CurrentThread.ManagedThreadId + GetType().FullName + typeof (T).FullName; } -}
\ No newline at end of file + } +} |
