PageRenderTime 49ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/Raven.Database/Indexing/CurrentTransformationScope.cs

https://github.com/barryhagan/ravendb
C# | 28 lines | 24 code | 4 blank | 0 comment | 0 complexity | 7228e5b37b08c17a026c7d4d467d9916 MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, BSD-3-Clause, CC-BY-SA-3.0
  1. using System;
  2. using System.Collections.Generic;
  3. using Raven.Database.Impl;
  4. using Raven.Json.Linq;
  5. namespace Raven.Database.Indexing
  6. {
  7. public class CurrentTransformationScope : IDisposable
  8. {
  9. [ThreadStatic]
  10. private static DocumentRetriever current;
  11. public static DocumentRetriever Current
  12. {
  13. get { return current; }
  14. }
  15. public CurrentTransformationScope(DocumentRetriever documentRetriever)
  16. {
  17. current = documentRetriever;
  18. }
  19. public void Dispose()
  20. {
  21. current = null;
  22. }
  23. }
  24. }