Ejemplo n.º 1
0
        internal static void Enqueue(AsyncHttpImage image)
        {
            lock(synclock)
                queue.Enqueue(image);

            signal.Set();
        }
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var channel = (ChannelInstance)value;

            if (channel.Configuration.Charasteristics.SupportsStatusUpdates)
            {
                var image = new AsyncHttpImage(delegate
                {
                    ChannelContext.Current.ClientContext =
                        new ChannelClientContext(ClientState.Current.Context, channel.Configuration);

                    var profile = channel.StatusUpdatesChannel.GetProfile();

                    return(profile.AvatarUrl);
                });

                return(image);
            }

            return(null);
        }