public void TestStrings() { var values = new[] { new ConfigPathHelper{ Name="item1", Path="path1 path3 path4\tpath5\rpath6\n\rpath7"}, new ConfigPathHelper{ Name="item2", Path="path2"}, }; var config = CreateConfig(values); var lookup = config.ToLookup(); Assert.Equal(2, lookup.Count); Assert.Equal(new[] { "path1", "path3", "path4", "path5", "path6", "path7" }, lookup["item1"]); Assert.Equal(new[] { "path2" }, lookup["item2"]); }
/// <summary> /// initialize from configuration /// </summary> /// <param name="config"></param> public static void Initialize(CoreConfig.IConfiguration config) { var rpcConfig = RpcConfigHelper.GetConfig(new CoreConfigurationSection(config)); Initialize(rpcConfig); }
/// <summary> /// /// </summary> /// <param name="config"></param> public CoreConfigurationSection(CoreConfig.IConfigurationSection config) : base(config) { //Node = node; }
private static void CreateDrivers(int carrierId, MyShuttleContext context) { var drivers = new[] { new Driver { Name = "Carlos Zimmermann", Phone = "555-178895", Picture = GetDriver(11), CarrierId = carrierId, RatingAvg = Randomize.Next(0, 5), TotalRides = Randomize.Next(50, 100), }, new Driver { Name = "Andrew Davis", Phone = "555-178895", Picture = GetDriver(12), CarrierId = carrierId, RatingAvg = Randomize.Next(0, 5), TotalRides = Randomize.Next(50, 100), }, new Driver { Name = "Carolina Anderson", Phone = "555-178895", Picture = GetDriver(13), CarrierId = carrierId, RatingAvg = Randomize.Next(0, 5), TotalRides = Randomize.Next(50, 100), }, new Driver { Name = "Julian Thomas", Phone = "555-178895", Picture = GetDriver(14), CarrierId = carrierId, RatingAvg = Randomize.Next(0, 5), TotalRides = Randomize.Next(50, 100), } }; context.Drivers.AddRange(drivers); context.SaveChanges(); }
public EmailEventHandler(ILogger <EmailEventHandler> lofger, ISendGridSend sendGridSend, Microsoft.Extensions.Configuration configuration) { _lofger = lofger; _sendGridSend = sendGridSend; _config = configuration; }
/// <summary> /// /// </summary> /// <param name="node"></param> public CoreConfiguration(CoreConfig.IConfiguration node) { Node = node; }