コード例 #1
0
        public async Task <IEntry> GetAsync(string path, CancellationToken cancellation = default)
        {
            var result = await _coordinationManager.GetAsync(CoordinationEntryPath.FromEscapedPath(path.AsMemory()), cancellation);

            if (result == null)
            {
                return(null);
            }

            return(new Entry((Proxy <CoordinationManagerSkeleton>) this, result));
        }
コード例 #2
0
        public async Task <IEntry> GetOrCreateAsync(string path, byte[] value, EntryCreationModes modes = EntryCreationModes.Default, CancellationToken cancellation = default)
        {
            var result = await _coordinationManager.GetOrCreateAsync(CoordinationEntryPath.FromEscapedPath(path.AsMemory()), value, modes, cancellation);

            if (result == null)
            {
                return(null);
            }

            return(new Entry((Proxy <CoordinationManagerSkeleton>) this, result));
        }
コード例 #3
0
 public Task <int> DeleteAsync(string path, int version = 0, bool recursive = false, CancellationToken cancellation = default)
 {
     return(_coordinationManager.DeleteAsync(CoordinationEntryPath.FromEscapedPath(path.AsMemory()), version, recursive, cancellation).AsTask());
 }
コード例 #4
0
 public Task <int> SetValueAsync(string path, byte[] value, int version = 0, CancellationToken cancellation = default)
 {
     return(_coordinationManager.SetValueAsync(CoordinationEntryPath.FromEscapedPath(path.AsMemory()), value, version, cancellation).AsTask());
 }