Exemplo n.º 1
0
    public override async Task <bool> ExistsAsync(BlobProviderExistsArgs args)
    {
        var blobName      = MinioBlobNameCalculator.Calculate(args);
        var client        = GetMinioClient(args);
        var containerName = GetContainerName(args);

        return(await BlobExistsAsync(client, containerName, blobName));
    }
Exemplo n.º 2
0
        public override Task <bool> ExistsAsync(BlobProviderExistsArgs args)
        {
            var containerName = GetContainerName(args);
            var blobName      = AliyunBlobNameCalculator.Calculate(args);
            var ossClient     = GetOssClient(args.Configuration);

            return(Task.FromResult(BlobExists(ossClient, containerName, blobName)));
        }
Exemplo n.º 3
0
        public override async Task <bool> ExistsAsync(BlobProviderExistsArgs args)
        {
            var ossClient = await GetOssClientAsync(args);

            var blobName = AliyunBlobNameCalculator.Calculate(args);

            return(await BlobExistsAsync(ossClient, args, blobName));
        }
Exemplo n.º 4
0
        public override async Task <bool> ExistsAsync(BlobProviderExistsArgs args)
        {
            var blobName      = AwsBlobNameCalculator.Calculate(args);
            var containerName = GetContainerName(args);

            using (var amazonS3Client = await GetAmazonS3Client(args))
            {
                return(await BlobExistsAsync(amazonS3Client, containerName, blobName));
            }
        }
Exemplo n.º 5
0
        public override async Task <bool> ExistsAsync(BlobProviderExistsArgs args)
        {
            var container =
                await DatabaseBlobContainerRepository.FindAsync(args.ContainerName,
                                                                args.CancellationToken);

            if (container == null)
            {
                return(false);
            }

            return(await DatabaseBlobRepository.ExistsAsync(container.Id, args.BlobName,
                                                            args.CancellationToken));
        }
        public void Exists_Test()
        {
            var tenantId = Guid.NewGuid();

            using (_currentTenant.Change(tenantId))
            {
                var bu            = _calculator.Calculate(GetArgs("my-container", "my-blob"));
                var containerName = "wei";
                var blobName      = "123";
                var tt            = new BlobProviderExistsArgs(
                    containerName,
                    new BlobContainerConfiguration().UseTencentCloudCos(cos => {
                    cos.AppId         = "";
                    cos.SecretId      = "";
                    cos.SecretKey     = "";
                    cos.ContainerName = "wei";
                    cos.Region        = EnumUtils.GetValue(CosRegion.AP_Guangzhou);
                }),
                    blobName
                    );
                var result = _blob.ExistsAsync(tt).GetAwaiter().GetResult();;
                Assert.False(result);
            }
        }
 public override Task <bool> ExistsAsync(BlobProviderExistsArgs args)
 {
     //TODO...
     return(null);
 }
Exemplo n.º 8
0
 public virtual Task <bool> ExistsAsync(BlobProviderExistsArgs args)
 {
     throw new System.NotImplementedException();
 }
Exemplo n.º 9
0
    public override Task <bool> ExistsAsync(BlobProviderExistsArgs args)
    {
        var filePath = FilePathCalculator.Calculate(args);

        return(ExistsAsync(filePath));
    }
Exemplo n.º 10
0
        public override async Task <bool> ExistsAsync(BlobProviderExistsArgs args)
        {
            var blobName = AzureBlobNameCalculator.Calculate(args);

            return(await BlobExistsAsync(args, blobName));
        }
Exemplo n.º 11
0
 public override Task <bool> ExistsAsync(BlobProviderExistsArgs args)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 12
0
 public override Task <bool> ExistsAsync(BlobProviderExistsArgs args)
 {
     return(BlobExistsAsync(args, TencentCloudBlobNameCalculator.Calculate(args)));
 }
Exemplo n.º 13
0
 public abstract Task <bool> ExistsAsync(BlobProviderExistsArgs args);