public void RemoveInstanceFromGroup(Instance i, Group g) { _service.RemoveInstanceFromGroup(i.ID, g.ID); g.Instances.Remove(i); InstancesWithoutGroup.AddOrUpdate(i); SourceItems.AddOrUpdate(CreateSourceItem(i)); }
public void RemoveGroup(Group g) { _service.RemoveGroup(g.ID); Groups.Remove(g); InstancesWithoutGroup.AddOrUpdate(g.Instances); SourceItems.AddOrUpdate(g.Instances.Select(i => CreateSourceItem(i))); }
public void AddInstanceToGroup(Instance i, Group g) { _service.AddInstanceToGroup(i.ID, g.ID); g.Instances.Add(i); InstancesWithoutGroup.Remove(i); SourceItems.AddOrUpdate(CreateSourceItem(i, g)); }