Class TypeModel
Represents a model.
Inheritance
Namespace: Umbraco.Cms.Infrastructure.ModelsBuilder.Building
Assembly: cs.temp.dll.dll
Syntax
public class TypeModel
Fields
Alias
Gets the alias of the model.
Declaration
public string Alias
Field Value
Type | Description |
---|---|
System. |
BaseType
Gets the base model.
Declaration
public TypeModel BaseType
Field Value
Type | Description |
---|---|
Type |
Remarks
If the content type does not have a base content type, then returns null
.
The current model inherits from its base model.
ClrName
Gets the clr name of the model.
Declaration
public string ClrName
Field Value
Type | Description |
---|---|
System. |
Remarks
This is the complete name eg "Foo.Bar.MyContent".
DeclaringInterfaces
Gets the list of interfaces that this model needs to declare it implements.
Declaration
public readonly List<TypeModel> DeclaringInterfaces
Field Value
Type | Description |
---|---|
System. |
Remarks
Some of these interfaces may actually be implemented by a base model that this model inherits from.
Description
Gets the description of the content type.
Declaration
public string Description
Field Value
Type | Description |
---|---|
System. |
HasBase
Gets a value indicating whether this model has a base class.
Declaration
public bool HasBase
Field Value
Type | Description |
---|---|
System. |
Remarks
Can be either because the content type has a base content type declared in Umbraco, or because the existing user's code declares a base class for this model.
Id
Gets the unique identifier of the corresponding content type.
Declaration
public int Id
Field Value
Type | Description |
---|---|
System. |
ImplementingInterfaces
Gets the list of interfaces that this model needs to actually implement.
Declaration
public readonly List<TypeModel> ImplementingInterfaces
Field Value
Type | Description |
---|---|
System. |
IsMixin
Gets a value indicating whether this model is used as a mixin by another model.
Declaration
public bool IsMixin
Field Value
Type | Description |
---|---|
System. |
IsParent
Gets a value indicating whether this model is the base model of another model.
Declaration
public bool IsParent
Field Value
Type | Description |
---|---|
System. |
MixinTypes
Gets the mixin models.
Declaration
public readonly List<TypeModel> MixinTypes
Field Value
Type | Description |
---|---|
System. |
Remarks
The current model implements mixins.
Name
Gets the name of the content type.
Declaration
public string Name
Field Value
Type | Description |
---|---|
System. |
ParentId
Gets the unique identifier of the parent.
Declaration
public int ParentId
Field Value
Type | Description |
---|---|
System. |
Remarks
The parent can either be a base content type, or a content types container. If the content
type does not have a base content type, then returns -1
.
Properties
Gets the list of properties that are defined by this model.
Declaration
public readonly List<PropertyModel> Properties
Field Value
Type | Description |
---|---|
System. |
Remarks
These are only those property that are defined locally by this model, and the list does not contain properties inherited from base models or from mixins.
Properties
IsElement
Gets a value indicating whether the type is an element.
Declaration
public bool IsElement { get; }
Property Value
Type | Description |
---|---|
System. |
ItemType
Gets or sets the model item type.
Declaration
public TypeModel.ItemTypes ItemType { get; set; }
Property Value
Type | Description |
---|---|
Type |
Methods
EnumerateBaseTypes(Boolean)
Enumerates the base models starting from the current model up.
Declaration
public IEnumerable<TypeModel> EnumerateBaseTypes(bool andSelf = false)
Parameters
Type | Name | Description |
---|---|---|
System. |
andSelf | Indicates whether the enumeration should start with the current model or from its base model. |
Returns
Type | Description |
---|---|
System. |
The base models. |
MapModelTypes(IList<TypeModel>, String)
Maps ModelType.
Declaration
public static void MapModelTypes(IList<TypeModel> typeModels, string ns)
Parameters
Type | Name | Description |
---|---|---|
System. |
typeModels | |
System. |
ns |