Class UniqueSmartFolderNameProvider
- Namespace
- CMS.ContentEngine
- Assembly
- CMS.ContentEngine.dll
Provides unique smart folder code names.
public class UniqueSmartFolderNameProvider : UniqueStringValueProviderBase
- Inheritance
-
objectUniqueStringValueProviderBaseUniqueSmartFolderNameProvider
- Extension Methods
Constructors
UniqueSmartFolderNameProvider(IInfoProvider<SmartFolderInfo>, int)
Creates a new instance of UniqueSmartFolderNameProvider.
public UniqueSmartFolderNameProvider(IInfoProvider<SmartFolderInfo> smartFolderInfoProvider, int maxLength = 50)
Parameters
smartFolderInfoProvider
IInfoProvider<SmartFolderInfo>Smart folder info provider.
maxLength
intMaximal length of the folder name. Default is CMS.ContentEngine.Internal.SmartFolderConstants.MAX_SMART_FOLDER_NAME_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.