1. Stylelabs.M.Sdk.Models.Content

Class EntityCopyOptionsBuilder

Default implementation of IEntityCopyOptionsBuilder.

Inheritance

object

EntityCopyOptionsBuilder

Implements

IEntityCopyOptionsBuilder

Namespace: StylelabsStylelabs.MSdkStylelabs.M.Sdk.ModelsContent

Assembly: Stylelabs.M.Sdk.dll

Syntax

public class EntityCopyOptionsBuilder : IEntityCopyOptionsBuilder

Constructors

EntityCopyOptionsBuilder()

Initializes a new instance of the EntityCopyOptionsBuilder class.

Declaration

public EntityCopyOptionsBuilder()

EntityCopyOptionsBuilder(IEntityCopyOptions)

Initializes a new instance of the EntityCopyOptionsBuilder class.

Declaration

public EntityCopyOptionsBuilder(IEntityCopyOptions copyOptions)

Parameters

TypeNameDescription
IEntityCopyOptionscopyOptionsThe IEntityCopyOptions.

Methods

Build()

Gets the resulting instance of IEntityCopyOptions.

Declaration

public IEntityCopyOptions Build()

Returns

TypeDescription
IEntityCopyOptionsThe builder.

WithCopyProfile(long)

Indicates that the entity should be copied using the copy profile with the specified id.

Declaration

public IEntityCopyOptionsBuilder WithCopyProfile(long id)

Parameters

TypeNameDescription
longidThe id of the copy profile.

Returns

TypeDescription
IEntityCopyOptionsBuilderThe builder.

WithCopyProfile(string)

Indicates that the entity should be copied using the copy profile with the specified identifier.

Declaration

public IEntityCopyOptionsBuilder WithCopyProfile(string identifier)

Parameters

TypeNameDescription
stringidentifierThe identifier of the copy profile.

Returns

TypeDescription
IEntityCopyOptionsBuilderThe builder.

WithDestinationEntityId(long)

Indicates that the entity should be copied to the entity with the specified id.

Declaration

public IEntityCopyOptionsBuilder WithDestinationEntityId(long id)

Parameters

TypeNameDescription
longidThe destination entity id.

Returns

TypeDescription
IEntityCopyOptionsBuilderThe builder.

WithProperties(IEnumerable)

Indicates that the entity should be copied with the specified properties.

Declaration

public IEntityCopyOptionsBuilder WithProperties(IEnumerable<IPropertyCopyOption> properties)

Parameters

TypeNameDescription
IEnumerable<>IPropertyCopyOptionpropertiesThe properties collection.

Returns

TypeDescription
IEntityCopyOptionsBuilderThe builder.

WithProperty(string, PropertyCopyMethod, string)

Indicates that the entity should be copied with the specified property.

Declaration

public IEntityCopyOptionsBuilder WithProperty(string property, PropertyCopyMethod method, string newValue = null)

Parameters

TypeNameDescription
stringpropertyThe name of the property.
PropertyCopyMethodmethodThe copy method.
stringnewValueThe property new value.

Returns

TypeDescription
IEntityCopyOptionsBuilderThe builder.

WithRelation(string, RelationCopyMethod, IEntityCopyOptions)

Indicates that the entity should be copied with the specified relation.

Declaration

public IEntityCopyOptionsBuilder WithRelation(string relation, RelationCopyMethod method, IEntityCopyOptions relatedOptions = null)

Parameters

TypeNameDescription
stringrelationThe name of the relation.
RelationCopyMethodmethodThe copy method.
IEntityCopyOptionsrelatedOptionsThe related options.

Returns

TypeDescription
IEntityCopyOptionsBuilderThe builder.

WithRelations(IEnumerable)

Indicates that the entity should be copied with the specified relations.

Declaration

public IEntityCopyOptionsBuilder WithRelations(IEnumerable<IRelationCopyOption> relations)

Parameters

TypeNameDescription
IEnumerable<>IRelationCopyOptionrelationsThe relations collection.

Returns

TypeDescription
IEntityCopyOptionsBuilderThe builder.

Implements

IEntityCopyOptionsBuilder

If you have suggestions for improving this article, let us know!