One more abstraction for GridUser so that it can be overridden in a sub-class.

connector_plugin
Diva Canto 2012-10-04 15:32:49 -07:00
parent 0b9bf236dd
commit 5b90f5bb17
1 changed files with 7 additions and 2 deletions

View File

@ -207,7 +207,7 @@ namespace OpenSim.Services.Connectors
if ((replyData != null) && replyData.ContainsKey("result") && (replyData["result"] != null)) if ((replyData != null) && replyData.ContainsKey("result") && (replyData["result"] != null))
{ {
if (replyData["result"] is Dictionary<string, object>) if (replyData["result"] is Dictionary<string, object>)
guinfo = new GridUserInfo((Dictionary<string, object>)replyData["result"]); guinfo = Create((Dictionary<string, object>)replyData["result"]);
} }
return guinfo; return guinfo;
@ -273,7 +273,7 @@ namespace OpenSim.Services.Connectors
{ {
if (griduser is Dictionary<string, object>) if (griduser is Dictionary<string, object>)
{ {
GridUserInfo pinfo = new GridUserInfo((Dictionary<string, object>)griduser); GridUserInfo pinfo = Create((Dictionary<string, object>)griduser);
rinfos.Add(pinfo); rinfos.Add(pinfo);
} }
else else
@ -286,5 +286,10 @@ namespace OpenSim.Services.Connectors
return rinfos.ToArray(); return rinfos.ToArray();
} }
protected virtual GridUserInfo Create(Dictionary<string, object> griduser)
{
return new GridUserInfo(griduser);
}
} }
} }