SnapDotNet.Apps.Converters.StoryToThumbnailConverter.Convert C# (CSharp) Method

Convert() public method

public Convert ( object value, Type targetType, object parameter, string language ) : object
value object
targetType System.Type
parameter object
language string
return object
        public object Convert(object value, Type targetType, object parameter, string language)
        {
            var story = value as Story;
            if (story == null) return null;

            // download thumbnail blob
            var blob = App.SnapChatManager.Endpoints.GetStoryThumbnailBlob(story);

            return (blob == null) ? null : blob.ToBitmapImage();
        }
StoryToThumbnailConverter