Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.7 KiB

  1. VERSION 1.0 CLASS
  2. BEGIN
  3. MultiUse = -1 'True
  4. Persistable = 0 'NotPersistable
  5. DataBindingBehavior = 0 'vbNone
  6. DataSourceBehavior = 0 'vbNone
  7. MTSTransactionMode = 0 'NotAnMTSObject
  8. END
  9. Attribute VB_Name = "Taxonomy"
  10. Attribute VB_GlobalNameSpace = False
  11. Attribute VB_Creatable = True
  12. Attribute VB_PredeclaredId = False
  13. Attribute VB_Exposed = False
  14. Option Explicit
  15. Public strCategory As String
  16. Public strEntry As String
  17. Public strURI As String
  18. Public strIconURI As String
  19. Public strTitle As String
  20. Public strDescription As String
  21. Public strType As String
  22. Public strVisible As String
  23. Public strSubSite As String
  24. Public strNavigationModel As String
  25. Public dictKeywords As Scripting.Dictionary
  26. Public Function SameAs( _
  27. ByRef u_TaxonomyRef As Taxonomy, _
  28. ByVal i_blnIgnoreKeywords As Boolean, _
  29. ByRef o_blnKeywordsRemoved As Boolean _
  30. ) As Boolean
  31. ' o_blnKeywordsRemoved: Ref taxonomy has keywords that we don't; otherwise we are identical
  32. Dim strKeyword As Variant
  33. If (u_TaxonomyRef Is Nothing) Then
  34. Exit Function
  35. End If
  36. With u_TaxonomyRef
  37. If ((LCase$(strCategory) <> LCase$(.strCategory)) Or _
  38. (LCase$(strEntry) <> LCase$(.strEntry)) Or _
  39. (LCase$(strURI) <> LCase$(.strURI)) Or _
  40. (LCase$(strIconURI) <> LCase$(.strIconURI)) Or _
  41. (LCase$(strTitle) <> LCase$(.strTitle)) Or _
  42. (LCase$(strDescription) <> LCase$(.strDescription)) Or _
  43. (LCase$(strType) <> LCase$(.strType)) Or _
  44. (LCase$(strVisible) <> LCase$(.strVisible)) Or _
  45. (LCase$(strSubSite) <> LCase$(.strSubSite)) Or _
  46. (LCase$(strNavigationModel) <> LCase$(.strNavigationModel))) Then
  47. Exit Function
  48. End If
  49. If (Not i_blnIgnoreKeywords) Then
  50. If (Not (dictKeywords Is Nothing)) Then
  51. If (.dictKeywords Is Nothing) Then
  52. Exit Function
  53. End If
  54. For Each strKeyword In dictKeywords
  55. If (Not .dictKeywords.Exists(strKeyword)) Then
  56. Exit Function
  57. ElseIf (dictKeywords(strKeyword) <> .dictKeywords(strKeyword)) Then
  58. Exit Function ' Priority changed
  59. Else
  60. .dictKeywords.Remove strKeyword
  61. End If
  62. Next
  63. If (.dictKeywords.Count <> 0) Then
  64. o_blnKeywordsRemoved = True
  65. Exit Function
  66. End If
  67. End If
  68. End If
  69. End With
  70. SameAs = True
  71. End Function