Beispiel #1
0
 /// <summary>
 /// Unregister mocked component from this object
 /// </summary>
 /// <param name="component">Mocked component to be unregistered</param>
 public void UnregisterComponent(MockedComponent component)
 {
     if (!registeredComponents.Contains(component))
     {
         return;
     }
     Root.MessagesManager.UnregisterObject(component);
     registeredComponents.Remove(component);
     ComponentUnregistered?.Invoke(component);
 }
Beispiel #2
0
 /// <summary>
 /// Register new mocked component to this object
 /// </summary>
 /// <param name="component">New mocked component to be registered</param>
 public void RegisterComponent(MockedComponent component)
 {
     if (registeredComponents.Contains(component))
     {
         return;
     }
     registeredComponents.Add(component);
     Root.MessagesManager.RegisterObject(component);
     NewComponentRegistered?.Invoke(component);
 }