public static void MergeRoutes(Dictionary <string, Route> newRouteDictionary) { if ((newRouteDictionary != null) && (newRouteDictionary.Count > 0)) { foreach (var item in newRouteDictionary) { IoC.RegisterInstance(typeof(Route), item.Key, item.Value); } } }
/// <summary> /// Merge routes. /// </summary> /// <param name="newCommandDictionary"> /// The new command dictionary. /// </param> public static void MergeCommands(Dictionary <string, Command> newCommandDictionary) { if (newCommandDictionary != null && newCommandDictionary.Any()) { foreach (var item in newCommandDictionary) { IoC.RegisterInstance(typeof(Command), item.Key, item.Value); } } }
public static void AddRoute(string key, Route route) { IoC.RegisterInstance(typeof(Route), key, route); }
/// <summary> /// Adds command. /// </summary> /// <param name="key"> /// The key. /// </param> /// <param name="command"> /// The command. /// </param> public static void AddCommand(string key, Command command) { IoC.RegisterInstance(typeof(Command), key, command); }