Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions AmbientDataFramework/ClaimStore.aspx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%@Page Language="C#" EnableViewState="false"%>
<%@Import Namespace="Tridion.ContentDelivery.AmbientData" %>
<%@Page Language="C#" EnableViewState="false" %>
<%@ Import Namespace="Sdl.Web.Delivery.ServicesCore.ClaimStore" %>
<%@Import Namespace="System.Collections.Generic" %>
<%@Import Namespace="System.Web.Script.Serialization" %>
<html>
Expand All @@ -12,7 +12,7 @@
if (Request.QueryString["format"] == "json")
{
IDictionary<System.Uri, object> values = AmbientDataContext.CurrentClaimStore.GetAll();
SortedDictionary<string, object> sorted = SortDictionary((IDictionary)values);
SortedDictionary<string, object> sorted = SortDictionary((IDictionary<System.Uri, object>)values);

Response.Clear();
Response.ContentType = "text/json";
Expand All @@ -21,15 +21,14 @@
}
}

protected SortedDictionary<string, object> SortDictionary(IDictionary dictionary)
{
protected SortedDictionary<string, object> SortDictionary(IDictionary<System.Uri, object> dictionary)
{
SortedDictionary<string, object> result = new SortedDictionary<string, object>();

foreach (DictionaryEntry entry in dictionary)
foreach (System.Uri key in dictionary.Keys)
{
result.Add(entry.Key.ToString(), entry.Value);
result.Add(key.ToString(), dictionary[key]);
}

return result;
}
</script>
Expand Down