29 using System.Collections.Generic;
30 using System.Reflection;
34 namespace OpenSim.Framework
38 private uint m_estateID = 1;
54 private UUID m_bannedUserID = UUID.Zero;
58 public UUID BannedUserID
62 return m_bannedUserID;
66 m_bannedUserID = value;
70 private string m_bannedHostAddress = string.Empty;
74 public string BannedHostAddress
78 return m_bannedHostAddress;
82 m_bannedHostAddress = value;
86 private string m_bannedHostIPMask = string.Empty;
90 public string BannedHostIPMask
94 return m_bannedHostIPMask;
98 m_bannedHostIPMask = value;
102 private string m_bannedHostNameMask = string.Empty;
106 public string BannedHostNameMask
110 return m_bannedHostNameMask;
114 m_bannedHostNameMask = value;
120 public Dictionary<string, object>
ToMap()
122 Dictionary<string, object> map =
new Dictionary<string, object>();
123 PropertyInfo[] properties = this.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance);
124 foreach (PropertyInfo p
in properties)
125 map[p.Name] = p.GetValue(
this, null);
132 foreach (KeyValuePair<string, object> kvp
in map)
134 PropertyInfo p = this.GetType().GetProperty(kvp.Key, BindingFlags.Public | BindingFlags.Instance);
137 object value = p.GetValue(
this, null);
139 p.SetValue(
this, map[p.Name], null);
140 else if (value is UInt32)
141 p.SetValue(
this, UInt32.Parse((string)map[p.Name]), null);
142 else if (value is Boolean)
143 p.SetValue(
this, Boolean.Parse((string)map[p.Name]), null);
144 else if (value is UUID)
145 p.SetValue(
this, UUID.Parse((string)map[p.Name]), null);
156 Dictionary<string, object> map = ToMap();
157 string result = string.Empty;
158 foreach (KeyValuePair<string, object> kvp
in map)
159 result += string.Format(
"{0}: {1} {2}", kvp.Key, kvp.Value, Environment.NewLine);
Dictionary< string, object > ToMap()
override string ToString()
For debugging
EstateBan(Dictionary< string, object > map)