LocalDataStoreSlot.cs 754 B

12345678910111213141516171819202122232425
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT license.
  3. // See the LICENSE file in the project root for more information.
  4. using System.Diagnostics.CodeAnalysis;
  5. using System.Threading;
  6. namespace System
  7. {
  8. public sealed class LocalDataStoreSlot
  9. {
  10. internal LocalDataStoreSlot(ThreadLocal<object?> data)
  11. {
  12. Data = data;
  13. GC.SuppressFinalize(this);
  14. }
  15. internal ThreadLocal<object?> Data { get; private set; }
  16. [SuppressMessage("Microsoft.Security", "CA1821", Justification = "Finalizer preserved for compat, it is suppressed by the constructor.")]
  17. ~LocalDataStoreSlot()
  18. {
  19. }
  20. }
  21. }