public async Task <bool> ExistsAsync(string documentId, string name) { var command = new HeadAttachmentCommand(documentId, name, null); await RequestExecutor.ExecuteAsync(command, Context, sessionInfo : SessionInfo).ConfigureAwait(false); return(command.Result != null); }
public bool AttachmentExists(string documentId, string name) { var command = new HeadAttachmentCommand(documentId, name, null); RequestExecutor.Execute(command, Context, sessionInfo: SessionInfo); return(command.Result != null); }
public async Task <bool> ExistsAsync(string documentId, string name, CancellationToken token = default) { using (Session.AsyncTaskHolder()) { var command = new HeadAttachmentCommand(documentId, name, null); await RequestExecutor.ExecuteAsync(command, Context, sessionInfo : SessionInfo, token).ConfigureAwait(false); return(command.Result != null); } }