Exemplo n.º 1
0
        public void AddVariableWithTest_Nulls_NotInserted()
        {
            // Act
            _dataCollector.Add(null, (string)null);

            // Assert
            Assert.AreEqual(0, _dataCollector.Items.Count);
            Assert.IsFalse(_dataCollector.IsDataExist("Foo"));
        }
Exemplo n.º 2
0
    public static void toggleLightsForPos(long posId)
    {
        // Get lights for pos
        List <TrafficLightLogic> trafficLights = TrafficLightsForPos [posId];

        foreach (TrafficLightLogic trafficLight in trafficLights)
        {
            trafficLight.manualSwitch();
        }
        DataCollector.Add("Manual traffic light switches", 1f);
    }
Exemplo n.º 3
0
        /// <summary>
        /// Processes this response
        /// </summary>
        public override ControllerResponseResult Process()
        {
            DataCollector.Add(TemplateFactory.Load(TemplateFileName));

            if (!string.IsNullOrEmpty(Title))
            {
                DataCollector.AddTitle(Title);
            }

            return(ControllerResponseResult.Default);
        }
Exemplo n.º 4
0
		public override ControllerResponseResult Process()
		{
			Context.Response.StatusCode = StatusCode;

			DataCollector.Add(Data);

			if (!string.IsNullOrEmpty(Title))
				DataCollector.AddTitle(Title);

			return ControllerResponseResult.Default;
		}
Exemplo n.º 5
0
        /// <summary>
        /// Processes this response
        /// </summary>
        public override ControllerResponseResult Process()
        {
            DataCollector.Add(Data);

            if (!string.IsNullOrEmpty(Title))
            {
                DataCollector.AddTitle(Title);
            }

            return(ControllerResponseResult.Default);
        }
Exemplo n.º 6
0
    // Use this for initialization
    void Start()
    {
        ExplosionHelper.Add(this);
        numberOfHumans++;
        humanId = humanInstanceCount++;
        DataCollector.Add("Total # of people", 1f);

        GenericHumanSounds.HumanCountChange();
        initHumanProfile();

        StartCoroutine(reportStats());
    }
Exemplo n.º 7
0
        /// <summary>
        /// Processes this response
        /// </summary>
        public override Task <ControllerResponseResult> Process()
        {
            Context.Response.StatusCode = StatusCode;

            DataCollector.Add(TemplateFactory.Load(TemplateFileName));

            if (!string.IsNullOrEmpty(Title))
            {
                DataCollector.AddTitle(Title);
            }

            return(Task.FromResult(ControllerResponseResult.Default));
        }
Exemplo n.º 8
0
    private IEnumerator reportStats()
    {
        do
        {
            yield return(new WaitForSeconds(1f));

            foreach (KeyValuePair <string, DataCollector.InnerData> stat in stats)
            {
                DataCollector.Add(stat.Key, stat.Value);
                stat.Value.reset();
            }
        } while (this.gameObject != null);
    }
Exemplo n.º 9
0
        /// <summary>
        /// Processes this response
        /// </summary>
        public override ControllerResponseResult Process()
        {
            Context.Response.StatusCode = StatusCode;

            DataCollector.Add(TemplateFactory.Load(TemplateFileName).Model(Model).Set());

            if (!string.IsNullOrEmpty(Title))
            {
                DataCollector.AddTitle(Title);
            }

            return(ControllerResponseResult.Default);
        }
Exemplo n.º 10
0
    private IEnumerator humanReachedGoal()
    {
        HumanCollider[] humanColliders = GetComponentsInChildren <HumanCollider> ();
        foreach (HumanCollider collider in humanColliders)
        {
            collider.GetComponent <BoxCollider> ().center = new Vector3(0f, 0f, 1000f);
        }

        yield return(null);

        Destroy(this.gameObject);
//		if (health > 0f) {
        PubSub.publish("points:inc", PointCalculator.humanDestinationPoints);
        DataCollector.Add("Humans reached goal", 1f);
//		}
        numberOfHumans--;
        GenericHumanSounds.HumanCountChange();
    }
Exemplo n.º 11
0
 public void AddVariableWithTest_Nulls_ArgumentException()
 {
     // Act & Assert
     Assert.Throws <ArgumentException>(() => _dataCollector.Add(null, (string?)null));
 }
Exemplo n.º 12
0
        /// <summary>
        /// Processes this response
        /// </summary>
        public override Task <ControllerResponseResult> Process()
        {
            DataCollector.Add(DataCollectorVariableName, Data);

            return(Task.FromResult(ControllerResponseResult.Default));
        }
Exemplo n.º 13
0
        public override ControllerResponseResult Process()
        {
            DataCollector.Add(DataCollectorVariableName, Data);

            return(ControllerResponseResult.Default);
        }
 public static InfoData <ExtraInfo> AddInfoData(this DataCollector dataCollector, InfoData <ExtraInfo> data)
 {
     return(dataCollector.Add <InfoData <ExtraInfo>, ExtraInfo>(data));
 }