Class UniqueContentFolderNameProvider
- Namespace
- CMS.ContentEngine
- Assembly
- CMS.ContentEngine.dll
Provides unique folder code names.
public class UniqueContentFolderNameProvider : UniqueStringValueProviderBase
- Inheritance
-
objectUniqueStringValueProviderBaseUniqueContentFolderNameProvider
- Extension Methods
Constructors
UniqueContentFolderNameProvider(IInfoProvider<ContentFolderInfo>, int)
Creates a new instance of UniqueContentFolderNameProvider.
public UniqueContentFolderNameProvider(IInfoProvider<ContentFolderInfo> contentFolderInfoProvider, int maxLength = 50)
Parameters
contentFolderInfoProvider
IInfoProvider<ContentFolderInfo>Content folder info provider.
maxLength
intMaximal length of the folder name. Default is CMS.ContentEngine.Internal.FolderTreeConstants.MAX_TREE_PATH_SEGMENT_LENGTH
Methods
GetUniqueValue(string)
Returns an unique value.
public override Task<string> GetUniqueValue(string inputValue)
Parameters
inputValue
stringValue to be check and made unique if needed.
Returns
- Task<string>
IsValueUnique(string)
Checks if value
is unique.
protected override Task<bool> IsValueUnique(string value)
Parameters
value
stringValue to check uniqueness.
Returns
- Task<bool>
True if
value
is unique. False otherwise.