public StreamPictureRequest(IImageStreamRenderer renderer, StreamPicture picture) { Id = (Int32)DateTime.Now.Ticks; Renderer = renderer; Picture = picture; Renderer.PictureRequestId = Id; }
private static void Enqueue(IImageStreamRenderer renderer, StreamPicture picture, Int32 priority) { if ((picture == null) || !picture.IsAvailable) { return; } if (!picture.UseAsyncPattern) { renderer.StreamContent = new ImageStreamContent(picture.Size, picture.GetStream()); } else { PictureProcessor.Enqueue(new StreamPictureRequest(renderer, picture), priority); } }