public void AddVariableWithTest_Nulls_NotInserted() { // Act _dataCollector.Add(null, (string)null); // Assert Assert.AreEqual(0, _dataCollector.Items.Count); Assert.IsFalse(_dataCollector.IsDataExist("Foo")); }
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); }
/// <summary> /// Processes this response /// </summary> public override ControllerResponseResult Process() { DataCollector.Add(TemplateFactory.Load(TemplateFileName)); if (!string.IsNullOrEmpty(Title)) { DataCollector.AddTitle(Title); } return(ControllerResponseResult.Default); }
public override ControllerResponseResult Process() { Context.Response.StatusCode = StatusCode; DataCollector.Add(Data); if (!string.IsNullOrEmpty(Title)) DataCollector.AddTitle(Title); return ControllerResponseResult.Default; }
/// <summary> /// Processes this response /// </summary> public override ControllerResponseResult Process() { DataCollector.Add(Data); if (!string.IsNullOrEmpty(Title)) { DataCollector.AddTitle(Title); } return(ControllerResponseResult.Default); }
// Use this for initialization void Start() { ExplosionHelper.Add(this); numberOfHumans++; humanId = humanInstanceCount++; DataCollector.Add("Total # of people", 1f); GenericHumanSounds.HumanCountChange(); initHumanProfile(); StartCoroutine(reportStats()); }
/// <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)); }
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); }
/// <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); }
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(); }
public void AddVariableWithTest_Nulls_ArgumentException() { // Act & Assert Assert.Throws <ArgumentException>(() => _dataCollector.Add(null, (string?)null)); }
/// <summary> /// Processes this response /// </summary> public override Task <ControllerResponseResult> Process() { DataCollector.Add(DataCollectorVariableName, Data); return(Task.FromResult(ControllerResponseResult.Default)); }
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)); }