Search Results for

    Show / Hide Table of Contents

    Class TypeModel

    Represents a model.

    Inheritance
    System.Object
    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.String

    BaseType

    Gets the base model.

    Declaration
    public TypeModel BaseType
    Field Value
    Type Description
    TypeModel
    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.String
    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.Collections.Generic.List<TypeModel>
    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.String

    HasBase

    Gets a value indicating whether this model has a base class.

    Declaration
    public bool HasBase
    Field Value
    Type Description
    System.Boolean
    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.Int32

    ImplementingInterfaces

    Gets the list of interfaces that this model needs to actually implement.

    Declaration
    public readonly List<TypeModel> ImplementingInterfaces
    Field Value
    Type Description
    System.Collections.Generic.List<TypeModel>

    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.Boolean

    IsParent

    Gets a value indicating whether this model is the base model of another model.

    Declaration
    public bool IsParent
    Field Value
    Type Description
    System.Boolean

    MixinTypes

    Gets the mixin models.

    Declaration
    public readonly List<TypeModel> MixinTypes
    Field Value
    Type Description
    System.Collections.Generic.List<TypeModel>
    Remarks

    The current model implements mixins.

    Name

    Gets the name of the content type.

    Declaration
    public string Name
    Field Value
    Type Description
    System.String

    ParentId

    Gets the unique identifier of the parent.

    Declaration
    public int ParentId
    Field Value
    Type Description
    System.Int32
    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.Collections.Generic.List<PropertyModel>
    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.Boolean

    ItemType

    Gets or sets the model item type.

    Declaration
    public TypeModel.ItemTypes ItemType { get; set; }
    Property Value
    Type Description
    TypeModel.ItemTypes

    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.Boolean andSelf

    Indicates whether the enumeration should start with the current model or from its base model.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<TypeModel>

    The base models.

    MapModelTypes(IList<TypeModel>, String)

    Maps ModelType.

    Declaration
    public static void MapModelTypes(IList<TypeModel> typeModels, string ns)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<TypeModel> typeModels
    System.String ns
    In This Article
    • Fields
      • Alias
      • BaseType
      • ClrName
      • DeclaringInterfaces
      • Description
      • HasBase
      • Id
      • ImplementingInterfaces
      • IsMixin
      • IsParent
      • MixinTypes
      • Name
      • ParentId
      • Properties
    • Properties
      • IsElement
      • ItemType
    • Methods
      • EnumerateBaseTypes(Boolean)
      • MapModelTypes(IList<TypeModel>, String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX