Guest User

Untitled

a guest
Jun 23rd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. Shared Property DALList() As Dictionary(Of String, DAL)
  2. Get
  3. If Not Web.HttpContext.Current.Items.Contains("_DALList") Then
  4. Web.HttpContext.Current.Items.Add("_DALList", New Dictionary(Of String, DAL))
  5. End If
  6. Return Web.HttpContext.Current.Items("_DALList")
  7. End Get
  8. Set(ByVal value As Dictionary(Of String, DAL))
  9. If Not Web.HttpContext.Current.Items.Contains("_DALList") Then
  10. Web.HttpContext.Current.Items.Add("_DALList", value)
  11. Else
  12. Web.HttpContext.Current.Items("_DALList") = value
  13. End If
  14. End Set
  15. End Property
  16.  
  17. Shared _CurrentScope As New Dictionary(Of String, DALScope)
  18. Public Shared Property CurrentScope() As DALScope
  19. Get
  20. If Not _CurrentScope.ContainsKey(Web.HttpContext.Current.Session.SessionID & "_CurrentScope") Then
  21. _CurrentScope.Add(Web.HttpContext.Current.Session.SessionID & "_CurrentScope", New DALScope)
  22. End If
  23. Return _CurrentScope(Web.HttpContext.Current.Session.SessionID & "_CurrentScope")
  24. End Get
  25. Set(ByVal value As DALScope)
  26. If Not _CurrentScope.ContainsKey(Web.HttpContext.Current.Session.SessionID & "_Currentscope") Then
  27. _CurrentScope.Add(Web.HttpContext.Current.Session.SessionID & "_Currentscope", value)
  28. Else
  29. _CurrentScope(Web.HttpContext.Current.Session.SessionID & "_Currentscope") = value
  30. End If
  31. End Set
  32. End Property
Add Comment
Please, Sign In to add comment