/// <summary> ///@see com.espertech.esper.adapter.AdapterCoordinator#add(com.espertech.esper.adapter.Adapter) /// </summary> public virtual void Coordinate(InputAdapter inputAdapter) { if (inputAdapter == null) { throw new ArgumentException("AdapterSpec cannot be null"); } if (!(inputAdapter is CoordinatedAdapter coordinatedAdapter)) { throw new ArgumentException("Cannot coordinate a Adapter of type " + inputAdapter.GetType()); } var adapter = coordinatedAdapter; if (_eventsFromAdapters.Values.Contains(adapter) || _emptyAdapters.Contains(adapter)) { return; } adapter.DisallowStateTransitions(); adapter.Runtime = _runtime; adapter.UsingEngineThread = _usingEngineThread; adapter.UsingExternalTimer = _usingExternalTimer; adapter.ScheduleSlot = _scheduleBucket.AllocateSlot(); AddNewEvent(adapter); }