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
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
formInfo
FormInfoForm info for which the name is to be unique.
name
stringName from which to create a unique name.
Returns
- string
Returns name derived from
name
which is unique within the form.
Exceptions
- ArgumentNullException
Thrown when
formInfo
orname
is null.- ArgumentException
Thrown when
name
is 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
existingFieldNames
ISet<string>Set of existing field names in for which the name is to be unique.
name
stringName from which to create a unique name.
Returns
- string
Returns name derived from
name
which is unique within the specified names.
Exceptions
- ArgumentNullException
Thrown when
existingFieldNames
orname
is null.- ArgumentException
Thrown when
name
is 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
formInfo
FormInfoForm info for which the name is to be unique.
name
stringName from which to create a unique name.
Returns
- string
Returns name derived from
name
which is unique within the form.
Exceptions
- ArgumentNullException
Thrown when
formInfo
orname
is null.- ArgumentException
Thrown when
name
is 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
existingFieldNames
ISet<string>Set of existing field names in for which the name is to be unique.
name
stringName from which to create a unique name.
Returns
- string
Returns name derived from
name
which is unique within the specified names.
Exceptions
- ArgumentNullException
Thrown when
existingFieldNames
orname
is null.- ArgumentException
Thrown when
name
is an empty string.