aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorDiva Canto2010-01-02 20:11:59 -0800
committerDiva Canto2010-01-02 20:11:59 -0800
commitf8c79fe20acb165adc363c3a0565ad53810ae341 (patch)
tree996781384056e7992ec0b5428de512273e2389d3 /OpenSim/Services
parentChange the requester a little (diff)
downloadopensim-SC-f8c79fe20acb165adc363c3a0565ad53810ae341.zip
opensim-SC-f8c79fe20acb165adc363c3a0565ad53810ae341.tar.gz
opensim-SC-f8c79fe20acb165adc363c3a0565ad53810ae341.tar.bz2
opensim-SC-f8c79fe20acb165adc363c3a0565ad53810ae341.tar.xz
Flattening the ServiceURLs
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/Interfaces/IUserAccountService.cs26
1 files changed, 23 insertions, 3 deletions
diff --git a/OpenSim/Services/Interfaces/IUserAccountService.cs b/OpenSim/Services/Interfaces/IUserAccountService.cs
index b2d5d48..87f0e6c 100644
--- a/OpenSim/Services/Interfaces/IUserAccountService.cs
+++ b/OpenSim/Services/Interfaces/IUserAccountService.cs
@@ -66,8 +66,22 @@ namespace OpenSim.Services.Interfaces
66 UUID.TryParse(kvp["ScopeID"].ToString(), out ScopeID); 66 UUID.TryParse(kvp["ScopeID"].ToString(), out ScopeID);
67 if (kvp.ContainsKey("Created")) 67 if (kvp.ContainsKey("Created"))
68 Convert.ToInt32(kvp["Created"].ToString()); 68 Convert.ToInt32(kvp["Created"].ToString());
69 if (kvp.ContainsKey("ServiceURLs") && kvp["ServiceURLs"] != null && (kvp["ServiceURLs"] is Dictionary<string, string>)) 69 if (kvp.ContainsKey("ServiceURLs") && kvp["ServiceURLs"] != null)
70 ServiceURLs = (Dictionary<string, object>)kvp["ServiceURLs"]; 70 {
71 ServiceURLs = new Dictionary<string, object>();
72 string str = kvp["ServiceURLs"].ToString();
73 if (str != string.Empty)
74 {
75 string[] parts = str.Split(new char[] { '#' });
76 Dictionary<string, object> dic = new Dictionary<string, object>();
77 foreach (string s in parts)
78 {
79 string[] parts2 = s.Split(new char[] { '=' });
80 if (parts2.Length == 2)
81 ServiceURLs[parts2[0]] = parts2[1];
82 }
83 }
84 }
71 } 85 }
72 86
73 public Dictionary<string, object> ToKeyValuePairs() 87 public Dictionary<string, object> ToKeyValuePairs()
@@ -79,10 +93,16 @@ namespace OpenSim.Services.Interfaces
79 result["PrincipalID"] = PrincipalID.ToString(); 93 result["PrincipalID"] = PrincipalID.ToString();
80 result["ScopeID"] = ScopeID.ToString(); 94 result["ScopeID"] = ScopeID.ToString();
81 result["Created"] = Created.ToString(); 95 result["Created"] = Created.ToString();
82 result["ServiceURLs"] = ServiceURLs; 96 string str = string.Empty;
97 foreach (KeyValuePair<string, object> kvp in ServiceURLs)
98 {
99 str += kvp.Key + "=" + kvp.Value + "#";
100 }
101 result["ServiceURLs"] = str;
83 102
84 return result; 103 return result;
85 } 104 }
105
86 }; 106 };
87 107
88 public interface IUserAccountService 108 public interface IUserAccountService