Table of Contents

Class TestInfoBuilderBase<TInfo>

Namespace
CMS.Tests
Assembly
CMS.Tests.dll

Base class for info object builders.

public abstract class TestInfoBuilderBase<TInfo> where TInfo : AbstractInfoBase<TInfo>, IInfoWithName, new()

Type Parameters

TInfo

The info object type.

Inheritance
object
TestInfoBuilderBase<TInfo>
Derived
Extension Methods

Constructors

TestInfoBuilderBase()

protected TestInfoBuilderBase()

Fields

infoCodeName

The info object code name.

protected string infoCodeName

Field Value

string

infoProvider

The info object provider.

protected IInfoProvider<TInfo> infoProvider

Field Value

IInfoProvider<TInfo>

Methods

Build()

Builds the info object.

protected abstract TInfo Build()

Returns

TInfo

BuildAndSet()

Builds the info object and sets it in the provider.

public TInfo BuildAndSet()

Returns

TInfo

Remarks

If the info object with the same code name already exists in the provider, it will be updated with the latest builder configuration.

BuildAndSetAsync()

Builds the info object and sets it in the provider asynchronously.

public Task<TInfo> BuildAndSetAsync()

Returns

Task<TInfo>

Remarks

If the info object with the same code name already exists in the provider, it will be updated with the latest builder configuration.

UpdateInfoValues(TInfo)

Updates the info object values.

protected abstract void UpdateInfoValues(TInfo info)

Parameters

info TInfo

The info object to update.