public void RegisterProperty() { // Checking if the property gets registered correctly PropertyHandler.RegisterProperty("UnitTest", ref testProp); Assert.Contains("UnitTest", PropertyHandler.GetProperties().Keys); Assert.Throws(typeof(PropertyHandlerException), () => PropertyHandler.RegisterProperty("UnitTest", ref testProp)); _registerPropertyTestRan = true; }
public void Register() { try { PropertyHandler.RegisterProperty($"{Name}.tickRate", ref tickRate); } catch (Exception) { App.Console?.Print($"Unable to register tickRate property for {Name} loop", Colors.Yellow); } }
public static void Setup() { AlgorithmAStar.ClearCache(); try { PropertyHandler.RegisterProperty("startingPrice", ref StartingPrice); PropertyHandler.RegisterProperty("pricePerKilometer", ref PricePerKilometer); } catch (Exception) { App.Console?.Print($"Unable to register properties for GPSSystem", Colors.Yellow); } }
public CityController(City city) { City = city; PropertyHandler.RegisterProperty("customerSpawnRate", ref customerSpawnRate); }