예제 #1
0
        public void OnUnavailableImage(long correlationId, long subscriptionRegistrationId, int streamId)
        {
            Subscription subscription = (Subscription)_resourceByRegIdMap[subscriptionRegistrationId];

            if (null != subscription)
            {
                Image image = subscription.RemoveImage(correlationId);
                if (null != image)
                {
                    UnavailableImageHandler handler = subscription.UnavailableImageHandler();
                    if (null != handler)
                    {
                        _isInCallback = true;

                        try
                        {
                            handler(image);
                        }
                        catch (Exception ex)
                        {
                            HandleError(ex);
                        }
                        finally
                        {
                            _isInCallback = false;
                        }
                    }
                }
            }
        }
예제 #2
0
        public void OnUnavailableImage(long correlationId, long subscriptionRegistrationId)
        {
            Subscription subscription = (Subscription)_resourceByRegIdMap[subscriptionRegistrationId];

            if (null != subscription)
            {
                Image image = subscription.RemoveImage(correlationId);
                if (null != image)
                {
                    UnavailableImageHandler handler = subscription.UnavailableImageHandler;
                    if (null != handler)
                    {
                        NotifyImageUnavailable(handler, image);
                    }
                }
            }
        }