Table of Contents

Class DocumentPrecondition

Namespace
Xapi.Client
Assembly
Xapi.Client.dll

An HTTP precondition for writing or deleting a document, so concurrent writers do not overwrite each other (IEEE 9274.1.1, 4.1.4). A failed precondition throws XapiPreconditionFailedException.

public sealed record DocumentPrecondition : IEquatable<DocumentPrecondition>
Inheritance
DocumentPrecondition
Implements
Inherited Members

Properties

HeaderName

The header name: If-Match or If-None-Match.

public string HeaderName { get; }

Property Value

string

HeaderValue

The header value: an ETag, or *.

public string HeaderValue { get; }

Property Value

string

IfNoneMatchAny

Only write if no document exists yet: If-None-Match: *.

public static DocumentPrecondition IfNoneMatchAny { get; }

Property Value

DocumentPrecondition

Methods

IfMatch(string)

Only write if the document has not changed since it was read: If-Match: <etag>.

public static DocumentPrecondition IfMatch(string etag)

Parameters

etag string

The ETag of the document as last read.

Returns

DocumentPrecondition

The precondition.

Remarks

Pass ETag exactly as the LRS returned it, quotes included.