Class Converter
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Helper functions for common converter scenarios
Inheritance
Inherited Members
Namespace: EPiServer.DataAbstraction.Internal
Assembly: EPiServer.dll
Version: 11.20.7Syntax
public class Converter
Constructors
Converter()
Declaration
public Converter()
Methods
ToIntZero(Object)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Returns 0 if parameter is anything else than of type System.Int32, also supports converting of False to 0 and True to 1.
Declaration
public static int ToIntZero(object val)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | val |
Returns
| Type | Description |
|---|---|
| System.Int32 |
ToStringEmpty(Object)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Returns String.Empty if parameter is anything else than of type System.String.
Declaration
public static string ToStringEmpty(object val)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | val |
Returns
| Type | Description |
|---|---|
| System.String |
ToStringNull(Object)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Tries to cast to a string.
Declaration
public static string ToStringNull(object val)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | val | The object to cast. |
Returns
| Type | Description |
|---|---|
| System.String |
|
ToSystemNull(Object)
Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Converts from System.DBNull to null.
Declaration
public static object ToSystemNull(object val)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | val | The object to convert. |
Returns
| Type | Description |
|---|---|
| System.Object |
|