Example #1
0
    public MultimediaAsset Adapt(MultimediaInfo info)
    {
        if (info == null)
        {
            return(new MultimediaAsset());
        }

        return(new MultimediaAsset {
            Height = info.Height,
            Width = info.Width,
            Size = info.Size,
            Url = _urlSvc.GetImageUrl(info.Path)
        });
    }
Example #2
0
    public PhotoMultimediaAsset Adapt(MultimediaInfo info, int photoId, string size)
    {
        if (info == null)
        {
            return(new PhotoMultimediaAsset());
        }

        return(new PhotoMultimediaAsset {
            Height = info.Height,
            Width = info.Width,
            Size = info.Size,
            Url = _urlSvc.GetImageUrl(info.Path),
            DownloadUrl = _urlSvc.GetImageDownloadUrl(photoId, size)
        });
    }