aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Monitoring/Stats
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Monitoring/Stats')
-rw-r--r--OpenSim/Framework/Monitoring/Stats/Stat.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/OpenSim/Framework/Monitoring/Stats/Stat.cs b/OpenSim/Framework/Monitoring/Stats/Stat.cs
index 85d1a78..c57ee0c 100644
--- a/OpenSim/Framework/Monitoring/Stats/Stat.cs
+++ b/OpenSim/Framework/Monitoring/Stats/Stat.cs
@@ -42,6 +42,8 @@ namespace OpenSim.Framework.Monitoring
42 { 42 {
43// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44 44
45 public static readonly char[] DisallowedShortNameCharacters = { '.' };
46
45 /// <summary> 47 /// <summary>
46 /// Category of this stat (e.g. cache, scene, etc). 48 /// Category of this stat (e.g. cache, scene, etc).
47 /// </summary> 49 /// </summary>
@@ -166,6 +168,12 @@ namespace OpenSim.Framework.Monitoring
166 throw new Exception( 168 throw new Exception(
167 string.Format("Stat cannot be in category '{0}' since this is reserved for a subcommand", category)); 169 string.Format("Stat cannot be in category '{0}' since this is reserved for a subcommand", category));
168 170
171 foreach (char c in DisallowedShortNameCharacters)
172 {
173 if (shortName.IndexOf(c) != -1)
174 throw new Exception(string.Format("Stat name {0} cannot contain character {1}", shortName, c));
175 }
176
169 ShortName = shortName; 177 ShortName = shortName;
170 Name = name; 178 Name = name;
171 Description = description; 179 Description = description;