Interface IElementEndpoint
Endpoint for an individual resource. Usually you will want to use the typed-variant of this interface: IElementEndpoint<TEntity>
public interface IElementEndpoint : IEndpoint
- Inherited Members
Properties
DeleteAllowed
Indicates whether the server has specified DeleteAsync(CancellationToken) is currently allowed.
bool? DeleteAllowed { get; }
Property Value
- bool?
true
if the method is allowed,false
if the method is not allowed,null
If no request has been sent yet or the server did not specify allowed methods.
Remarks
Uses cached data from last response.
Methods
DeleteAsync(CancellationToken)
Deletes the element.
Task DeleteAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenUsed to cancel the request.
Returns
Exceptions
- InvalidOperationException
The entity has changed since it was last retrieved with ReadAsync(CancellationToken). Your delete call was rejected to prevent a lost update.
- InvalidDataException
- AuthenticationException
- UnauthorizedAccessException
- KeyNotFoundException
- HttpRequestException
Other non-success status code.
ExistsAsync(CancellationToken)
Determines whether the element currently exists.
Task<bool> ExistsAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenUsed to cancel the request.
Returns
Exceptions
- AuthenticationException
- UnauthorizedAccessException
- HttpRequestException
Other non-success status code.