public async Task Handle(RebuildCapabilityStatement notification, CancellationToken cancellationToken) { await _metadataSemaphore.WaitAsync(cancellationToken); try { if (_builder != null) { switch (notification.Part) { case RebuildPart.SearchParameter: // Update search params; _builder.SyncSearchParameters(); break; case RebuildPart.Profiles: // Update supported profiles; _builder.SyncProfiles(true); break; } } _metadata = null; } finally { _metadataSemaphore.Release(); } }