コード例 #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));
 }
コード例 #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());
        }
コード例 #3
0
 public BlobNotFoundException(BlobName name, Exception exception)
     : base($"The blob with name {name} was not found.", exception)
 {
     Name = name;
 }
コード例 #4
0
 public BlobAlreadyExistsException(BlobName name, Exception exception)
     : base($"The blob with name {name} already exists.", exception)
 {
     Name = name;
 }