Table of Contents

Class ContentTypeAttributeAssembler

Namespace
ToSic.Eav.Data.Build.Sys
Assembly
ToSic.Eav.Data.Build.dll

Internal helper to assemble IContentTypeAttribute definitions.

[InternalApi_DoNotUse_MayChangeWithoutNotice]
public class ContentTypeAttributeAssembler : ServiceBase, IHasLog
Inheritance
object
ContentTypeAttributeAssembler
Implements
Inherited Members

Remarks

Technically this could all be done with static methods, but because we want to be able to inject dependencies in the future, this is a class.

Methods

Create(int, string, ValueTypes, bool, int, int, Guid?, ContentTypeAttributeSysSettings?, IMetadata?, IList<IEntity>?, Func<IHasMetadataSourceAndExpiring>?)

Create a ContentType Attribute. This contains the definition of a single attribute of a content type. Specifically its name, what value type it accepts etc.

public IContentTypeAttribute Create(int appId, string name, ValueTypes type, bool isTitle, int id = 0, int sortOrder = 0, Guid? guid = null, ContentTypeAttributeSysSettings? sysSettings = null, IMetadata? metadata = null, IList<IEntity>? metadataItems = null, Func<IHasMetadataSourceAndExpiring>? metaSourceFinder = null)

Parameters

appId int
name string
type ValueTypes
isTitle bool
id int
sortOrder int
guid Guid?
sysSettings ContentTypeAttributeSysSettings
metadata IMetadata
metadataItems IList<IEntity>
metaSourceFinder Func<IHasMetadataSourceAndExpiring>

Returns

IContentTypeAttribute

CreateFrom(IContentTypeAttribute, int?, string?, ValueTypes?, bool?, int?, int?, IMetadata?, List<IEntity>?)

public IContentTypeAttribute CreateFrom(IContentTypeAttribute original, int? appId = null, string? name = null, ValueTypes? type = null, bool? isTitle = null, int? id = null, int? sortOrder = null, IMetadata? metadata = null, List<IEntity>? metadataItems = null)

Parameters

original IContentTypeAttribute
appId int?
name string
type ValueTypes?
isTitle bool?
id int?
sortOrder int?
metadata IMetadata
metadataItems List<IEntity>

Returns

IContentTypeAttribute