aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/UserStatistics/Prototype_distributor.cs
blob: 8a7a18fff9f9e0a71b5417fae66afb1414a55e73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using OpenSim.Framework;

namespace OpenSim.Region.UserStatistics
{
    public class Prototype_distributor : IStatsController
    {
        private string prototypejs=string.Empty;


        public Hashtable ProcessModel(Hashtable pParams)
        {
            Hashtable pResult = new Hashtable();
            if (prototypejs.Length == 0)
            {
                StreamReader fs = new StreamReader(new FileStream(Util.dataDir() + "/data/prototype.js", FileMode.Open));
                prototypejs = fs.ReadToEnd();
            }
            pResult["js"] = prototypejs;
            return pResult;
        }

        public string RenderView(Hashtable pModelResult)
        {
            return pModelResult["js"].ToString();
        }

    }
}