public override Stream GetBlobStream(Guid blobId, CallContext context)
        {
            Assert.ArgumentNotNull(context, "context");

            var memStream = new MemoryStream();

            StorageProvider.Get(memStream, blobId.ToString());
            return(memStream.Length > 0 ? memStream : null);
        }
예제 #2
0
        public void Get_Media_From_Storage()
        {
            // Arrange
            var fileStream = File.OpenRead(MediaFilePath);
            var mediaId    = GetMediaId();

            StorageProvider.Put(fileStream, mediaId);

            var stream = new MemoryStream();

            // Act
            StorageProvider.Get(stream, mediaId);

            // Assert
            System.Diagnostics.Debug.Print($"Stream length {stream.Length}");
            Assert.IsTrue(stream.Length > 0);
        }