public static ContentFile ToContentModel(this BlobInfo blobInfo)
 {
     var retVal = new ContentFile();
     retVal.InjectFrom(blobInfo);
     retVal.Name = blobInfo.FileName;
     retVal.MimeType = blobInfo.ContentType;
     retVal.Size = blobInfo.Size.ToHumanReadableSize();
     retVal.ModifiedDate = blobInfo.ModifiedDate;
     return retVal;
 }
        public static ContentFile ToContentModel(this BlobInfo blobInfo)
        {
            var retVal = new ContentFile();

            retVal.InjectFrom(blobInfo);
            retVal.Name         = blobInfo.FileName;
            retVal.MimeType     = blobInfo.ContentType;
            retVal.Size         = blobInfo.Size.ToString();
            retVal.ModifiedDate = blobInfo.ModifiedDate;
            return(retVal);
        }
Beispiel #3
0
        public static ContentFile ToContentModel(this BlobInfo blobInfo)
        {
            if (blobInfo == null)
            {
                throw new ArgumentNullException(nameof(blobInfo));
            }

            var retVal = new ContentFile();

            retVal.InjectFrom(blobInfo);
            retVal.Name         = blobInfo.FileName;
            retVal.MimeType     = blobInfo.ContentType;
            retVal.Size         = blobInfo.Size.ToString();
            retVal.ModifiedDate = blobInfo.ModifiedDate;
            return(retVal);
        }