Beispiel #1
0
        public void CustomData(string dataName, string dataValue)
        {
            if (!this.Started)
                return;

            Event e = new Event("ctD", this.SessionId, this.FlowNumber);

            e.Add("nm", dataName);
            e.Add("vl", dataValue);

            this._array.Add(e);
        }
Beispiel #2
0
        public void Start(string appId, string appVer, bool enabled = true)
        {
            if (this.Started || !Config.Enabled)
                return;

            Event e = new Event("strApp", this.SessionId);

            Config.AppId = appId;
            Config.AppVer = appVer;

            // Get os + hardware config
            OperatingSystem.OperatingSystem osInfo = OperatingSystem.OperatingSystem.GetOperatingSystemInfo();
            Hardware.Hardware hwInfo = osInfo.Hardware;

            e.Add("ID", this.UniqueId);
            e.Add("aid", appId);
            e.Add("aver", appVer);

            e.Add("osv", osInfo.Version);
            e.Add("ossp", osInfo.ServicePack);
            e.Add("osar", osInfo.Architecture);
            e.Add("osjv", osInfo.JavaVersion);
            e.Add("osnet", osInfo.FrameworkVersion);
            e.Add("osnsp", osInfo.FrameworkSP);
            e.Add("oslng", osInfo.Lcid);
            e.Add("osscn", hwInfo.ScreenResolution);

            e.Add("cnm", hwInfo.CPUName);
            e.Add("car", hwInfo.CPUArchitecture);
            e.Add("cbr", hwInfo.CPUBrand);
            e.Add("cfr", hwInfo.CPUFrequency);
            e.Add("ccr", hwInfo.CPUCores);
            e.Add("mtt", hwInfo.MemoryTotal);
            e.Add("mfr", hwInfo.MemoryFree);
            e.Add("dtt", hwInfo.DiskTotal);
            e.Add("dfr", hwInfo.DiskFree);

            this._array.Add(e);

            this._started = true;
        }
Beispiel #3
0
        public void Uninstall()
        {
            if (!this.Started)
                return;

            Event e = new Event("ust", this.SessionId, this.FlowNumber);

            e.Add("aid", Config.AppId);
            e.Add("aver", Config.AppVer);

            this._array.Add(e);
        }
Beispiel #4
0
        public void License(Licenses l)
        {
            if (!this.Started)
                return;

            Event e = new Event("ctD", this.SessionId, this.FlowNumber);

            e.Add("nm", "License");

            string licenseType = "";
            switch (l)
            {
                case Licenses.Free:
                    {
                        licenseType = "F";
                        break;
                    }
                case Licenses.Trial:
                    {
                        licenseType = "T";
                        break;
                    }
                case Licenses.Demo:
                    {
                        licenseType = "D";
                        break;
                    }
                case Licenses.Registered:
                    {
                        licenseType = "R";
                        break;
                    }
                case Licenses.Cracked:
                    {
                        licenseType = "C";
                        break;
                    }
            }

            e.Add("vl", licenseType);

            this._array.Add(e);
        }
Beispiel #5
0
        public void Log(string logMessage)
        {
            if (!this.Started)
                return;

            Event e = new Event("lg", this.SessionId, this.FlowNumber);

            e.Add("ms", logMessage);

            this._array.Add(e);
        }
Beispiel #6
0
        public void Exception(Exception ex)
        {
            if (!this.Started)
                return;

            Event e = new Event("exC", this.SessionId, this.FlowNumber);

            e.Add("msg", ex.Message);
            e.Add("stk", ex.StackTrace);
            e.Add("src", ex.Source);
            e.Add("tgs", ex.TargetSite);

            this._array.Add(e);
        }
Beispiel #7
0
        public void Exception(string exceptionMsg, string stackTrace, string exceptionSrc, string targetSite)
        {
            if (!this.Started)
                return;

            Event e = new Event("exC", this.SessionId, this.FlowNumber);

            e.Add("msg", exceptionMsg);
            e.Add("stk", stackTrace);
            e.Add("src", exceptionSrc);
            e.Add("tgs", targetSite);

            this._array.Add(e);
        }
Beispiel #8
0
        public void EventValue(string categoryName, string eventName, string eventValue)
        {
            if (!this.Started)
                return;

            Event e = new Event("evV", this.SessionId, this.FlowNumber);

            e.Add("ca", categoryName);
            e.Add("nm", eventName);
            e.Add("vl", eventValue);

            this._array.Add(e);
        }
Beispiel #9
0
        public void EventPeriod(string categoryName, string eventName, int eventDuration, bool eventCompleted)
        {
            if (!this.Started)
                return;

            Event e = new Event("evP", this.SessionId, this.FlowNumber);

            e.Add("ca", categoryName);
            e.Add("nm", eventName);
            e.Add("tm", eventDuration);
            e.Add("ec", (eventCompleted) ? (1) : (0));

            this._array.Add(e);
        }
Beispiel #10
0
 public int IndexOf(Event eventData)
 {
     return this.InnerList.IndexOf(eventData);
 }
Beispiel #11
0
 public bool Contains(Event eventData)
 {
     return this.InnerList.Contains(eventData);
 }
Beispiel #12
0
 public int Add(Event eventData)
 {
     return this.InnerList.Add(eventData);
 }