diff options
Diffstat (limited to 'OpenSim/Region/UserStatistics/Prototype_distributor.cs')
-rw-r--r-- | OpenSim/Region/UserStatistics/Prototype_distributor.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/OpenSim/Region/UserStatistics/Prototype_distributor.cs b/OpenSim/Region/UserStatistics/Prototype_distributor.cs new file mode 100644 index 0000000..8a7a18f --- /dev/null +++ b/OpenSim/Region/UserStatistics/Prototype_distributor.cs | |||
@@ -0,0 +1,33 @@ | |||
1 | using System; | ||
2 | using System.IO; | ||
3 | using System.Collections; | ||
4 | using System.Collections.Generic; | ||
5 | using System.Text; | ||
6 | using OpenSim.Framework; | ||
7 | |||
8 | namespace OpenSim.Region.UserStatistics | ||
9 | { | ||
10 | public class Prototype_distributor : IStatsController | ||
11 | { | ||
12 | private string prototypejs=string.Empty; | ||
13 | |||
14 | |||
15 | public Hashtable ProcessModel(Hashtable pParams) | ||
16 | { | ||
17 | Hashtable pResult = new Hashtable(); | ||
18 | if (prototypejs.Length == 0) | ||
19 | { | ||
20 | StreamReader fs = new StreamReader(new FileStream(Util.dataDir() + "/data/prototype.js", FileMode.Open)); | ||
21 | prototypejs = fs.ReadToEnd(); | ||
22 | } | ||
23 | pResult["js"] = prototypejs; | ||
24 | return pResult; | ||
25 | } | ||
26 | |||
27 | public string RenderView(Hashtable pModelResult) | ||
28 | { | ||
29 | return pModelResult["js"].ToString(); | ||
30 | } | ||
31 | |||
32 | } | ||
33 | } | ||