aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorDiva Canto2014-05-31 11:40:54 -0700
committerJustin Clark-Casey2014-06-10 20:22:18 +0100
commit4da471a5aa8e6a554e6dc010bf1b7a44b94ad7a3 (patch)
tree58f8fb00db294c6ca64858dd72aa0945bc92040c /OpenSim/Framework
parentAdded missing reference (diff)
downloadopensim-SC_OLD-4da471a5aa8e6a554e6dc010bf1b7a44b94ad7a3.zip
opensim-SC_OLD-4da471a5aa8e6a554e6dc010bf1b7a44b94ad7a3.tar.gz
opensim-SC_OLD-4da471a5aa8e6a554e6dc010bf1b7a44b94ad7a3.tar.bz2
opensim-SC_OLD-4da471a5aa8e6a554e6dc010bf1b7a44b94ad7a3.tar.xz
Fix a bug where estate not found would result in a dummy estate record with erroneous information.
Also, added conversion of EstateSettings from/to key-value pairs in preparation for robust net work connectors.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/EstateSettings.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs
index a02993d..dd3e195 100644
--- a/OpenSim/Framework/EstateSettings.cs
+++ b/OpenSim/Framework/EstateSettings.cs
@@ -28,6 +28,7 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using System.Reflection;
31using OpenMetaverse; 32using OpenMetaverse;
32 33
33namespace OpenSim.Framework 34namespace OpenSim.Framework
@@ -411,5 +412,23 @@ namespace OpenSim.Framework
411 { 412 {
412 return l_EstateGroups.Contains(groupID); 413 return l_EstateGroups.Contains(groupID);
413 } 414 }
415
416 public Dictionary<string, object> ToMap()
417 {
418 Dictionary<string, object> map = new Dictionary<string, object>();
419 PropertyInfo[] properties = this.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance);
420 foreach (PropertyInfo p in properties)
421 map[p.Name] = p.GetValue(this, null);
422
423 return map;
424 }
425
426 public EstateSettings(Dictionary<string, object> map)
427 {
428 PropertyInfo[] properties = this.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance);
429 foreach (PropertyInfo p in properties)
430 p.SetValue(this, map[p.Name], null);
431
432 }
414 } 433 }
415} 434}