Ejemplo n.º 1
0
 public override void TemplateRegistryComponentCheckAssignment(RegistryComponent component)
 {
     if (MainRegistryFile.Default.OutputFileCreators[Header.Id][component.ReferencePosition] == component.Header.Id) throw new Exception("The component is still assigned to another one");
 }
Ejemplo n.º 2
0
 private void CheckAssignment(RegistryComponent component)
 {
     if (component == null) return;
     if (component.ReferencePosition == -1) return;
     foreach (var moduleComponent in Modules.Cast<RegistryComposite>().SelectMany(module => module.Cast<Module>())) moduleComponent.TemplateRegistryComponentCheckAssignment(component);
 }
Ejemplo n.º 3
0
 public abstract void RemoveComponent(RegistryComponent component);
Ejemplo n.º 4
0
        public override void RemoveComponent(RegistryComponent component)
        {
            foreach (var modulesComposite in Modules.Cast<RegistryComposite>().Where(modulesComposite => modulesComposite.Cast<object>().Any(module => component == module)))
            {
                CheckAssignment(component);
                Logger.Log("ID: " + component.Header.Id + " Component " + component.Header.Name + " has been removed");

                var module = (Module)component;
                module.Deinitialize();
                modulesComposite.Children.Remove(component);
            }
            UpdateRegistry();
        }
Ejemplo n.º 5
0
 public override void TemplateRegistryComponentCheckAssignment(RegistryComponent component)
 {
 }
Ejemplo n.º 6
0
 public abstract void TemplateRegistryComponentCheckAssignment(RegistryComponent component);
Ejemplo n.º 7
0
 public void Add(RegistryComponent component)
 {
     _children.Add(component);
 }
Ejemplo n.º 8
0
 public void Remove(RegistryComponent component)
 {
     _children.Remove(component);
 }