# BookOnixMessage

A schema-validated ONIX 3.1 complete-record, block-update or deletion message derived from complete export results.

Class 

`OfficeIMO.Workflows`

**Namespace**

`OfficeIMO.Workflows`

**Assembly**

`OfficeIMO.Workflows`

**Source revision**

`3b680b1b6fb1` with working tree changes

**Source**

[BookOnixMessage.cs:40](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Workflows/Publishing/BookOnixMessage.cs#L40)

**Modifiers**

sealed

A schema-validated ONIX 3.1 complete-record, block-update or deletion message derived from complete export results.

## Inheritance

- object
- BookOnixMessage

## Usage

Explore 3 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 3

- Method [BookOnixMessage.Create](/api/workflows/officeimo-workflows-bookonixmessage/#method-create-collections-generic-ireadonlylist-officeimo-workflows-bookonixexportresult-xml-schema-xmlschemaset-threading-cancellationtoken)
- Method [BookOnixMessage.CreateBlockUpdates](/api/workflows/officeimo-workflows-bookonixmessage/#method-createblockupdates-collections-generic-ireadonlylist-officeimo-workflows-bookonixblockupdate-xml-schema-xmlschemaset-threading-cancellationtoken)
- Method [BookOnixMessage.CreateDeletions](/api/workflows/officeimo-workflows-bookonixmessage/#method-createdeletions-collections-generic-ireadonlylist-officeimo-workflows-bookonixdeletion-xml-schema-xmlschemaset-threading-cancellationtoken)

Filter members 

Show inherited

## Methods

`public static BookOnixMessage Create(IReadOnlyList<BookOnixExportResult> products, XmlSchemaSet schemas, CancellationToken cancellationToken = default)` [#](#method-create-collections-generic-ireadonlylist-officeimo-workflows-bookonixexportresult-xml-schema-xmlschemaset-threading-cancellationtoken)

[BookOnixMessage.cs:40](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Workflows/Publishing/BookOnixMessage.cs#L40)

Composes 1–1000 unmodified ExportOnix results with the same serialized header (sender and UTC timestamp). Rejects repeated record references or ISBNs, altered ONIX or EPUB bytes, and combined XML over 16 MiB. The supplied compiled schema validates the complete message. No input is changed and no delivery occurs. Callers own schema provenance and must not mutate inputs or schemas during this operation.

Parameters

**products System.Collections.Generic.IReadOnlyList<OfficeIMO.Workflows.BookOnixExportResult> required**

**schemas System.Xml.Schema.XmlSchemaSet required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`BookOnixMessage`

`public static BookOnixMessage CreateBlockUpdates(IReadOnlyList<BookOnixBlockUpdate> updates, XmlSchemaSet schemas, CancellationToken cancellationToken = default)` [#](#method-createblockupdates-collections-generic-ireadonlylist-officeimo-workflows-bookonixblockupdate-xml-schema-xmlschemaset-threading-cancellationtoken)

[BookOnixMessage.Changes.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Workflows/Publishing/BookOnixMessage.Changes.cs#L19)

Composes 1–1000 explicit block updates (notification 04). Selected blocks are copied whole; unselected blocks are omitted, and only ClearBlocks emits empty blocks. All source headers must match. ProductSupply block selection copies every unnamed source repeat. Named markets use explicit reference selections. Missing selected blocks or markets fail; market removals are explicit reference-only supply declarations. Retains the source EPUB association and the same integrity, schema, cancellation and size gates as Create. Does not compare recipient state or transmit instructions. Do not mutate inputs or schemas during composition.

Parameters

**updates System.Collections.Generic.IReadOnlyList<OfficeIMO.Workflows.BookOnixBlockUpdate> required**

**schemas System.Xml.Schema.XmlSchemaSet required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`BookOnixMessage`

`public static BookOnixMessage CreateDeletions(IReadOnlyList<BookOnixDeletion> deletions, XmlSchemaSet schemas, CancellationToken cancellationToken = default)` [#](#method-createdeletions-collections-generic-ireadonlylist-officeimo-workflows-bookonixdeletion-xml-schema-xmlschemaset-threading-cancellationtoken)

[BookOnixMessage.Changes.cs:67](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Workflows/Publishing/BookOnixMessage.Changes.cs#L67)

Composes explicit metadata-record deletions (notification 05), keeping record references and product identifiers. Reasons are optional plain text; product status changes must instead use complete records or block updates. The source headers, exact EPUB provenance, integrity and size gates remain in force. No deletion is transmitted.

Parameters

**deletions System.Collections.Generic.IReadOnlyList<OfficeIMO.Workflows.BookOnixDeletion> required**

**schemas System.Xml.Schema.XmlSchemaSet required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`BookOnixMessage`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public byte[] Bytes { get; }` [#](#property-bytes)

[BookOnixMessage.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Workflows/Publishing/BookOnixMessage.cs#L20)

UTF-8 ONIX XML, at most 16 MiB, with products in the supplied order.

`public BookOnixMessageKind Kind { get; }` [#](#property-kind)

[BookOnixMessage.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Workflows/Publishing/BookOnixMessage.cs#L23)

The explicit operation encoded by this message.

`public IReadOnlyList<BookOnixExportResult> Products { get; }` [#](#property-products)

[BookOnixMessage.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/3b680b1b6fb15a268ff5525a4ca6cdd70b2f6613/OfficeIMO.Workflows/Publishing/BookOnixMessage.cs#L31)

Original complete export results, retaining each exact EPUB, hash, writer report and import diagnostics. For updates or deletions these are provenance, not copies of the partial records in Bytes. The collection is snapshotted, but the results' byte arrays remain caller-owned and mutable. Integrity is checked during composition; later edits do not update this message.

<!-- PowerForge markdown artifact sha256:6F44E545CED953F9F05166D6B4517F14B1105B0D355EE5C504193D57D3DE7C59 -->
