private void EnsureQueryAllowsSubscription(IEpcisQuery query) { if (!query.AllowSubscription) { throw new EpcisException(ExceptionType.SubscribeNotPermittedException, $"Query '{query?.Name}' does not exist or doesn't allow subscription"); } }
private void EnsureQueryExists(IEpcisQuery epcisQuery, string queryName) { if (epcisQuery == null) { throw new EpcisException(ExceptionType.NoSuchNameException, $"Unknown query: '{queryName}'"); } }