C# Class formulate.core.Extensions.StringExtensions

Extension methods for strings.
Exibir arquivo Open project: rhythmagency/formulate

Public Methods

Method Description
ConvertFieldTypeToAngularType ( this fieldType ) : string

Converts a field type (e.g., "TextField") to an Angular-friendly type (e.g., "text").

ConvertValidationTypeToAngularType ( this validationType ) : string

Converts a validation type (e.g., "ValidationRegex") to an Angular-friendly type (e.g., "regex").

Fallback ( this source, string fallback ) : string

Uses a fallback string if the specified source string is null or whitespace.

Method Details

ConvertFieldTypeToAngularType() public static method

Converts a field type (e.g., "TextField") to an Angular-friendly type (e.g., "text").
public static ConvertFieldTypeToAngularType ( this fieldType ) : string
fieldType this /// The field type (e.g., "TextField"). ///
return string

ConvertValidationTypeToAngularType() public static method

Converts a validation type (e.g., "ValidationRegex") to an Angular-friendly type (e.g., "regex").
public static ConvertValidationTypeToAngularType ( this validationType ) : string
validationType this /// The validation type (e.g., "ValidationRegex"). ///
return string

Fallback() public static method

Uses a fallback string if the specified source string is null or whitespace.
public static Fallback ( this source, string fallback ) : string
source this The source string.
fallback string The fallback string.
return string