예제 #1
0
 private RBlobStream(IRBlobInfo blob, bool canWrite, IRBlobService blobService)
 {
     _blob        = blob;
     _canWrite    = canWrite;
     _blobService = blobService;
     _isDisposed  = false;
 }
예제 #2
0
 public DataTransferSession(IRSession session, IFileSystem fs)
 {
     _session     = session;
     _blobService = _session;
     _fs          = fs;
     _cleanup     = new List <IRBlobInfo>();
 }
예제 #3
0
 public static Task<RBlobStream> OpenAsync(IRBlobInfo blobInfo, IRBlobService blobService, CancellationToken ct = default(CancellationToken)) {
     return Task.FromResult(Open(blobInfo, blobService));
 }
예제 #4
0
 public static RBlobStream Open(IRBlobInfo blobInfo, IRBlobService blobService) {
     return new RBlobStream(blobInfo, false, blobService);
 }
예제 #5
0
 public static async Task<RBlobStream> CreateAsync(IRBlobService blobService, CancellationToken ct = default(CancellationToken)) {
     var blobId = await blobService.CreateBlobAsync(ct);
     return new RBlobStream(new RBlobInfo(blobId), true, blobService);
 }
예제 #6
0
 public static RBlobStream Create(IRBlobService blobService) {
     return CreateAsync(blobService).GetAwaiter().GetResult();
 }
예제 #7
0
 public DataTransferSession(IRSession session, IFileSystem fs) {
     _session = session;
     _blobService = _session;
     _fs = fs;
     _cleanup = new List<IRBlobInfo>();
 }
예제 #8
0
 private RBlobStream(IRBlobInfo blob, bool canWrite, IRBlobService blobService) {
     _blob = blob;
     _canWrite = canWrite;
     _blobService = blobService;
     _isDisposed = false;
 }
예제 #9
0
 public static Task <RBlobStream> OpenAsync(IRBlobInfo blobInfo, IRBlobService blobService, CancellationToken ct = default(CancellationToken))
 => Task.FromResult(Open(blobInfo, blobService));
예제 #10
0
 public static RBlobStream Open(IRBlobInfo blobInfo, IRBlobService blobService) => new RBlobStream(blobInfo, false, blobService);
예제 #11
0
        public static async Task <RBlobStream> CreateAsync(IRBlobService blobService, CancellationToken ct = default(CancellationToken))
        {
            var blobId = await blobService.CreateBlobAsync(ct);

            return(new RBlobStream(new RBlobInfo(blobId), true, blobService));
        }
예제 #12
0
 public static RBlobStream Create(IRBlobService blobService) => CreateAsync(blobService).GetAwaiter().GetResult();
예제 #13
0
 public static Task DestroyAsync(IRBlobInfo blobInfo, IRBlobService blobService, CancellationToken ct = default(CancellationToken))
 {
     return(blobService.DestroyBlobsAsync(new ulong[] { blobInfo.Id }, ct));
 }
예제 #14
0
 public static RBlobStream Open(IRBlobInfo blobInfo, IRBlobService blobService)
 {
     return(new RBlobStream(blobInfo, false, blobService));
 }
예제 #15
0
 public static RBlobStream Create(IRBlobService blobService)
 {
     return(CreateAsync(blobService).GetAwaiter().GetResult());
 }
예제 #16
0
 public static void Destroy(IRBlobInfo blobInfo, IRBlobService blobService) {
     blobService.DestroyBlobsAsync(new ulong[] { blobInfo.Id }).GetAwaiter().GetResult();
 }
예제 #17
0
 public static Task DestroyAsync(IRBlobInfo blobInfo, IRBlobService blobService, CancellationToken ct = default(CancellationToken)) {
     return blobService.DestroyBlobsAsync(new ulong[] { blobInfo.Id }, ct);
 }
예제 #18
0
 public static void Destroy(IRBlobInfo blobInfo, IRBlobService blobService) => blobService.DestroyBlobsAsync(new ulong[] { blobInfo.Id }).GetAwaiter().GetResult();
예제 #19
0
 public static Task DestroyAsync(IRBlobInfo blobInfo, IRBlobService blobService, CancellationToken ct = default(CancellationToken))
 => blobService.DestroyBlobsAsync(new [] { blobInfo.Id }, ct);
예제 #20
0
 public DataTransferSession(IRBlobService service, IFileSystem fs)
 {
     _blobService = service;
     _fs          = fs;
     _cleanup     = new List <IRBlobInfo>();
 }