Class FormInfoHelper
- Namespace
- CMS.FormEngine
- Assembly
- CMS.FormEngine.dll
Contains utility methods related to FormInfo class.
public class FormInfoHelper : AbstractHelper<FormInfoHelper>
- Inheritance
-
objectFormInfoHelper
- Inherited Members
- Extension Methods
Constructors
FormInfoHelper()
public FormInfoHelper()
Methods
GetUniqueFieldName(FormInfo, string)
Gets unique name for name within the specified formInfo by appending
a suffix containing ordinal number.
public static string GetUniqueFieldName(FormInfo formInfo, string name)
Parameters
formInfoFormInfoForm info for which the name is to be unique.
namestringName from which to create a unique name.
Returns
- string
Returns name derived from
namewhich is unique within the form.
Exceptions
- ArgumentNullException
Thrown when
formInfoornameis null.- ArgumentException
Thrown when
nameis an empty string.
GetUniqueFieldName(ISet<string>, string)
Gets unique name for name within the specified existingFieldNames by appending
a suffix containing ordinal number.
public static string GetUniqueFieldName(ISet<string> existingFieldNames, string name)
Parameters
existingFieldNamesISet<string>Set of existing field names in for which the name is to be unique.
namestringName from which to create a unique name.
Returns
- string
Returns name derived from
namewhich is unique within the specified names.
Exceptions
- ArgumentNullException
Thrown when
existingFieldNamesornameis null.- ArgumentException
Thrown when
nameis an empty string.
GetUniqueFieldNameInternal(FormInfo, string)
Gets unique name for name within the specified formInfo by appending
a suffix containing ordinal number.
protected virtual string GetUniqueFieldNameInternal(FormInfo formInfo, string name)
Parameters
formInfoFormInfoForm info for which the name is to be unique.
namestringName from which to create a unique name.
Returns
- string
Returns name derived from
namewhich is unique within the form.
Exceptions
- ArgumentNullException
Thrown when
formInfoornameis null.- ArgumentException
Thrown when
nameis an empty string.
GetUniqueFieldNameInternal(ISet<string>, string)
Gets unique name for name within the specified existingFieldNames by appending
a suffix containing ordinal number.
protected virtual string GetUniqueFieldNameInternal(ISet<string> existingFieldNames, string name)
Parameters
existingFieldNamesISet<string>Set of existing field names in for which the name is to be unique.
namestringName from which to create a unique name.
Returns
- string
Returns name derived from
namewhich is unique within the specified names.
Exceptions
- ArgumentNullException
Thrown when
existingFieldNamesornameis null.- ArgumentException
Thrown when
nameis an empty string.