Class UdiEntityTypeHelper
Provides helper methods for converting between UDI entity types and Umbraco object types.
Inheritance
object
Namespace: Umbraco.Cms.Core
Assembly: Umbraco.Core.dll
Syntax
public static class UdiEntityTypeHelper
Methods
View SourceFromUmbracoObjectType(UmbracoObjectTypes)
Converts an UmbracoObjectTypes value to its corresponding UDI entity type string.
Declaration
public static string FromUmbracoObjectType(UmbracoObjectTypes umbracoObjectType)
Parameters
| Type | Name | Description |
|---|---|---|
| UmbracoObjectTypes | umbracoObjectType | The Umbraco object type to convert. |
Returns
| Type | Description |
|---|---|
| string | The UDI entity type string. |
Exceptions
| Type | Condition |
|---|---|
| NotSupportedException | The Umbraco object type does not have a matching entity type. |
ToUmbracoObjectType(string)
Converts a UDI entity type string to its corresponding UmbracoObjectTypes value.
Declaration
public static UmbracoObjectTypes ToUmbracoObjectType(string entityType)
Parameters
| Type | Name | Description |
|---|---|---|
| string | entityType | The UDI entity type string to convert. |
Returns
| Type | Description |
|---|---|
| UmbracoObjectTypes | The corresponding UmbracoObjectTypes value. |
Exceptions
| Type | Condition |
|---|---|
| NotSupportedException | The entity type does not have a matching Umbraco object type. |