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)); }
public async ValueTask <IEntry> GetOrCreateAsync(CoordinationEntryPath path, ReadOnlyMemory <byte> value, EntryCreationModes modes = EntryCreationModes.Default, CancellationToken cancellation = default) { var proxy = await GetProxyAsync(cancellation); if (!(await proxy.ExecuteAsync(p => p.GetOrCreateAsync(path.EscapedPath.ConvertToString(), value.ToArray(), modes, cancellation)) is CoordinationManagerSkeleton.Entry entry)) { return(null); } entry.SetCoordinationManagerStub(this, proxy); return(entry); }