Table of Contents

Interface DatabaseDefinitions.IDBComponentDefinitionBuilder

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

Fluent builder for a component definition.

public interface DatabaseDefinitions.IDBComponentDefinitionBuilder

Methods

Build()

Finalizes the definition and registers it on the owning DatabaseDefinitions.

void Build()

WithField<T>(int, string, int)

Adds a field of unmanaged type T at the given byte offset.

DatabaseDefinitions.IDbComponentFieldDefinitionBuilder WithField<T>(int fieldId, string name, int offset) where T : unmanaged

Parameters

fieldId int

Unique field identifier within the component.

name string

Field name.

offset int

Byte offset of the field within the component's storage.

Returns

DatabaseDefinitions.IDbComponentFieldDefinitionBuilder

A field-scoped builder for further per-field configuration.

Type Parameters

T

The field's unmanaged CLR type.

WithPOCO<T>()

Associates a POCO type T with the component being built.

DatabaseDefinitions.IDBComponentDefinitionBuilder WithPOCO<T>()

Returns

DatabaseDefinitions.IDBComponentDefinitionBuilder

This builder.

Type Parameters

T

The POCO type.