Ejemplo n.º 1
0
 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);
         }
     }
 }
Ejemplo n.º 2
0
 /// <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);
         }
     }
 }
Ejemplo n.º 3
0
 public static void AddRoute(string key, Route route)
 {
     IoC.RegisterInstance(typeof(Route), key, route);
 }
Ejemplo n.º 4
0
 /// <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);
 }