public void Detach(EventBus bus)
{
string name = "attached " + bus.framework.Name;
var index = Array.FindIndex(this.attached, 0, this.attachedCount, q => q.Name == name);
if (index != -1)
{
var found = this.attached[index];
for (int i = index; i < this.attachedCount - 1; ++i)
this.attached[i] = this.attached[i + 1];
this.attachedCount--;
bus.DataPipe.Remove(found);
}
else
Console.WriteLine($"EventBus::Detach Can not find attached bus queue : {bus.framework.Name}");
}