Class CreateLanguageVariantParameters
- Namespace
- CMS.ContentEngine
- Assembly
- CMS.ContentEngine.dll
Parameters for creating a new language variant of a content item.
public sealed class CreateLanguageVariantParameters
- Inheritance
-
objectCreateLanguageVariantParameters
- Extension Methods
Constructors
CreateLanguageVariantParameters(int, string, string)
Initializes a new instance of CreateLanguageVariantParameters
public CreateLanguageVariantParameters(int contentItemId, string displayName, string languageName)
Parameters
contentItemIdintThe id of the content item for which to create a new variant.
displayNamestringThe display name to be used of the new variant to be used in the user interface.
languageNamestringThe language codename of the new language for which to create a new variant.
Exceptions
- ArgumentException
Thrown when
displayNameorlanguageNameare null or empty.
Properties
AiProvenance
AI provenance of the created language variant's fields, keyed by field GUID. Fields without an entry are not marked. null or an empty dictionary when no field is marked.
public IReadOnlyDictionary<Guid, AiProvenance> AiProvenance { get; set; }
Property Value
- IReadOnlyDictionary<Guid, AiProvenance>
ContentItemId
The Id of the content item for which to create a new language variant.
public int ContentItemId { get; }
Property Value
- int
DisplayName
The display name of the new variant, used to identify the item in user interface.
public string DisplayName { get; }
Property Value
- string
LanguageName
The language codename of the new language variant for which to create a new variant.
public string LanguageName { get; }
Property Value
- string
ScheduledPublishWhen
Date and time when the content item should be published.
public DateTime? ScheduledPublishWhen { get; set; }
Property Value
- DateTime?
Remarks
Setting System.DateTime.MinValue is treated as null.
ScheduledUnpublishWhen
Date and time when the content item should be unpublished.
public DateTime? ScheduledUnpublishWhen { get; set; }
Property Value
- DateTime?
Remarks
Setting System.DateTime.MinValue is treated as null.
VersionStatus
Version status in which the new language variant will be created. Default status is InitialDraft.
public VersionStatus VersionStatus { get; set; }
Property Value
Remarks
You cannot create content item in Draft version. First create a Published version, then create a Draft using TryCreateDraft(int, string, CancellationToken).
Exceptions
- ArgumentException
Thrown when you attempt to set the VersionStatus to Draft.