Ejemplo n.º 1
0
 internal void Remove(InstanceInfo info)
 {
     if (!InstanceMap.TryRemove(info.InstanceId, out var removed))
     {
         InstanceMap.TryRemove(info.HostName, out removed);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Remove a Core.
 /// </summary>
 /// <remarks>
 ///     <para>
 ///         Remove the Model, View, Controller and Facade
 ///         instances for the given key.
 ///     </para>
 /// </remarks>
 /// <param name="key">multitonKey of the Core to remove</param>
 public static void RemoveCore(string key)
 {
     if (InstanceMap.TryGetValue(key, out _) == false)
     {
         return;
     }
     Model.RemoveModel(key);
     View.RemoveView(key);
     Controller.RemoveController(key);
     InstanceMap.TryRemove(key, out _);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Remove an IView instance
 /// </summary>
 /// <param name="key">multitonKey of IView instance to remove</param>
 public static void RemoveView(string key)
 {
     InstanceMap.TryRemove(key, out _);
 }
 /// <summary>
 /// Remove an IController instance
 /// </summary>
 /// <param name="key">multitonKey of IController instance to remove</param>
 public static void RemoveController(string key)
 {
     InstanceMap.TryRemove(key, out _);
 }
Ejemplo n.º 5
0
 public static void RemoveModel(stirng key)
 {
     InstanceMap.TryRemove(key, out _);
 }