Example #1
0
 public BlobObject(BlobName name, Metadata metadata, ContentType contentType, Func <CancellationToken, Task <Stream> > openContent)
 {
     Name         = name;
     ContentType  = contentType;
     Metadata     = metadata;
     _openContent = openContent ?? throw new ArgumentNullException(nameof(openContent));
 }
Example #2
0
        public void ToStringReturnsExpectedResult()
        {
            var value = new string(
                (char)new Random().Next(97, 123),  // a-z
                new Random().Next(1, BlobName.MaxLength + 1)
                );
            var sut = new BlobName(value);

            Assert.Equal(value, sut.ToString());
        }
 public BlobNotFoundException(BlobName name, Exception exception)
     : base($"The blob with name {name} was not found.", exception)
 {
     Name = name;
 }
Example #4
0
 public BlobAlreadyExistsException(BlobName name, Exception exception)
     : base($"The blob with name {name} already exists.", exception)
 {
     Name = name;
 }