Exemplo n.º 1
0
 private RBlobStream(IRBlobInfo blob, bool canWrite, IRBlobService blobService)
 {
     _blob        = blob;
     _canWrite    = canWrite;
     _blobService = blobService;
     _isDisposed  = false;
 }
Exemplo n.º 2
0
 public DataTransferSession(IRSession session, IFileSystem fs)
 {
     _session     = session;
     _blobService = _session;
     _fs          = fs;
     _cleanup     = new List <IRBlobInfo>();
 }
Exemplo n.º 3
0
 public static Task<RBlobStream> OpenAsync(IRBlobInfo blobInfo, IRBlobService blobService, CancellationToken ct = default(CancellationToken)) {
     return Task.FromResult(Open(blobInfo, blobService));
 }
Exemplo n.º 4
0
 public static RBlobStream Open(IRBlobInfo blobInfo, IRBlobService blobService) {
     return new RBlobStream(blobInfo, false, blobService);
 }
Exemplo n.º 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);
 }
Exemplo n.º 6
0
 public static RBlobStream Create(IRBlobService blobService) {
     return CreateAsync(blobService).GetAwaiter().GetResult();
 }
Exemplo n.º 7
0
 public DataTransferSession(IRSession session, IFileSystem fs) {
     _session = session;
     _blobService = _session;
     _fs = fs;
     _cleanup = new List<IRBlobInfo>();
 }
Exemplo n.º 8
0
 private RBlobStream(IRBlobInfo blob, bool canWrite, IRBlobService blobService) {
     _blob = blob;
     _canWrite = canWrite;
     _blobService = blobService;
     _isDisposed = false;
 }
Exemplo n.º 9
0
 public static Task <RBlobStream> OpenAsync(IRBlobInfo blobInfo, IRBlobService blobService, CancellationToken ct = default(CancellationToken))
 => Task.FromResult(Open(blobInfo, blobService));
Exemplo n.º 10
0
 public static RBlobStream Open(IRBlobInfo blobInfo, IRBlobService blobService) => new RBlobStream(blobInfo, false, blobService);
Exemplo n.º 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));
        }
Exemplo n.º 12
0
 public static RBlobStream Create(IRBlobService blobService) => CreateAsync(blobService).GetAwaiter().GetResult();
Exemplo n.º 13
0
 public static Task DestroyAsync(IRBlobInfo blobInfo, IRBlobService blobService, CancellationToken ct = default(CancellationToken))
 {
     return(blobService.DestroyBlobsAsync(new ulong[] { blobInfo.Id }, ct));
 }
Exemplo n.º 14
0
 public static RBlobStream Open(IRBlobInfo blobInfo, IRBlobService blobService)
 {
     return(new RBlobStream(blobInfo, false, blobService));
 }
Exemplo n.º 15
0
 public static RBlobStream Create(IRBlobService blobService)
 {
     return(CreateAsync(blobService).GetAwaiter().GetResult());
 }
Exemplo n.º 16
0
 public static void Destroy(IRBlobInfo blobInfo, IRBlobService blobService) {
     blobService.DestroyBlobsAsync(new ulong[] { blobInfo.Id }).GetAwaiter().GetResult();
 }
Exemplo n.º 17
0
 public static Task DestroyAsync(IRBlobInfo blobInfo, IRBlobService blobService, CancellationToken ct = default(CancellationToken)) {
     return blobService.DestroyBlobsAsync(new ulong[] { blobInfo.Id }, ct);
 }
Exemplo n.º 18
0
 public static void Destroy(IRBlobInfo blobInfo, IRBlobService blobService) => blobService.DestroyBlobsAsync(new ulong[] { blobInfo.Id }).GetAwaiter().GetResult();
Exemplo n.º 19
0
 public static Task DestroyAsync(IRBlobInfo blobInfo, IRBlobService blobService, CancellationToken ct = default(CancellationToken))
 => blobService.DestroyBlobsAsync(new [] { blobInfo.Id }, ct);
Exemplo n.º 20
0
 public DataTransferSession(IRBlobService service, IFileSystem fs)
 {
     _blobService = service;
     _fs          = fs;
     _cleanup     = new List <IRBlobInfo>();
 }