Table of Contents

Class DocSchemaRepo

Namespace
Tlabs.Data.Repo
Assembly
Tlabs.Data.dll

see cref="DocumentSchema"/> spcific repository implementation.

public class DocSchemaRepo : BaseRepo<DocumentSchema>, IDocSchemaRepo, IRepo<DocumentSchema>, INonQueryRepo<DocumentSchema>
Inheritance
DocSchemaRepo
Implements
Inherited Members
Extension Methods

Constructors

DocSchemaRepo(IDataStore, ISerializer<DocumentSchema>)

Ctor from store.

public DocSchemaRepo(IDataStore store, ISerializer<DocumentSchema> schemaSeri)

Parameters

store IDataStore
schemaSeri ISerializer<DocumentSchema>

Methods

Attach(DocumentSchema)

public override DocumentSchema Attach(DocumentSchema schema)

Parameters

schema DocumentSchema

Returns

DocumentSchema

CreateFromStreams(Func<DocumentSchema, IDocSchemaProcessor>, Stream, Stream?, Stream?, Stream?)

Create schema from streams (using validateSchemaSyntax callback for schema syntax validation).

public DocumentSchema CreateFromStreams(Func<DocumentSchema, IDocSchemaProcessor> validateSchemaSyntax, Stream schemaStrm, Stream? formStrm = null, Stream? styleStrm = null, Stream? calcModelStrm = null)

Parameters

validateSchemaSyntax Func<DocumentSchema, IDocSchemaProcessor>
schemaStrm Stream
formStrm Stream
styleStrm Stream
calcModelStrm Stream

Returns

DocumentSchema

CreateFromStreams(IDocProcessorRepo, Stream, Stream?, Stream?, Stream?)

Create schema from streams (using docProcRepo for schema syntax validation).

public DocumentSchema CreateFromStreams(IDocProcessorRepo docProcRepo, Stream schemaStrm, Stream? formStrm = null, Stream? styleStrm = null, Stream? calcModelStrm = null)

Parameters

docProcRepo IDocProcessorRepo
schemaStrm Stream
formStrm Stream
styleStrm Stream
calcModelStrm Stream

Returns

DocumentSchema

CreateFromStreams(SchemaDefinitionStreams, Func<DocumentSchema, IDocSchemaProcessor>)

Create schema from defStreams using validateSchemaSyntax callback for schema syntax validation.

public DocumentSchema CreateFromStreams(SchemaDefinitionStreams defStreams, Func<DocumentSchema, IDocSchemaProcessor> validateSchemaSyntax)

Parameters

defStreams SchemaDefinitionStreams
validateSchemaSyntax Func<DocumentSchema, IDocSchemaProcessor>

Returns

DocumentSchema

CreateFromStreams(SchemaDefinitionStreams, IDocProcessorRepo)

Create schema from defStreams (using docProcRepo for schema syntax validation).

public DocumentSchema CreateFromStreams(SchemaDefinitionStreams defStreams, IDocProcessorRepo docProcRepo)

Parameters

defStreams SchemaDefinitionStreams
docProcRepo IDocProcessorRepo

Returns

DocumentSchema

Delete(DocumentSchema)

public override void Delete(DocumentSchema schema)

Parameters

schema DocumentSchema

Evict(DocumentSchema)

public override void Evict(DocumentSchema schema)

Parameters

schema DocumentSchema

FilteredTypeIdList(string?)

List of TypeId(s) optionally filterd by typeIdFilter.

public IQueryable<string> FilteredTypeIdList(string? typeIdFilter = null)

Parameters

typeIdFilter string

Returns

IQueryable<string>

FormData(string, FormDataType)

Returns form data for schemaId of type.

public Stream FormData(string schemaId, FormDataType type)

Parameters

schemaId string
type FormDataType

Returns

Stream

Data Stream.

Get(params object[])

public override DocumentSchema Get(params object[] keys)

Parameters

keys object[]

Returns

DocumentSchema

GetByAltTypeName(string)

Get schema by altName.

public DocumentSchema GetByAltTypeName(string altName)

Parameters

altName string

Returns

DocumentSchema

Exceptions

DataEntityNotFoundException<T>

if altName not found

GetByTypeId(string)

Get schema by typeId.

public DocumentSchema GetByTypeId(string typeId)

Parameters

typeId string

Returns

DocumentSchema

Exceptions

DataEntityNotFoundException<T>

if typeId not found

Insert(DocumentSchema)

public override DocumentSchema Insert(DocumentSchema schema)

Parameters

schema DocumentSchema

Returns

DocumentSchema

StreamsByTypeId(string, bool)

Get schema def. streams by typeId.

public SchemaDefinitionStreams StreamsByTypeId(string typeId, bool schemaStream = false)

Parameters

typeId string
schemaStream bool

Returns

SchemaDefinitionStreams

TryGetByAltTypeName(string, out DocumentSchema)

Try to get schema by altName.

public bool TryGetByAltTypeName(string altName, out DocumentSchema schema)

Parameters

altName string
schema DocumentSchema

Returns

bool

TryGetByTypeId(string, out DocumentSchema)

Try to get schema by typeId.

public bool TryGetByTypeId(string typeId, out DocumentSchema schema)

Parameters

typeId string
schema DocumentSchema

Returns

bool

Update(DocumentSchema)

public override DocumentSchema Update(DocumentSchema schema)

Parameters

schema DocumentSchema

Returns

DocumentSchema