Search Results for

    Show / Hide Table of Contents
    View Source

    Class ModelsBuilderSettings

    Typed configuration options for models builder settings.

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Configuration.Models
    Assembly: Umbraco.Core.dll
    Syntax
    [UmbracoOptions("Umbraco:CMS:ModelsBuilder", BindNonPublicProperties = true)]
    public class ModelsBuilderSettings

    Properties

    View Source

    AcceptUnsafeModelsDirectory

    Gets or sets a value indicating whether to accept an unsafe value for ModelsDirectory.

    Declaration
    public bool AcceptUnsafeModelsDirectory { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    An unsafe value is an absolute path, or a relative path pointing outside of the website root.

    View Source

    DebugLevel

    Gets or sets a value indicating the debug log level.

    Declaration
    public int DebugLevel { get; set; }
    Property Value
    Type Description
    int
    Remarks

    0 means minimal (safe on live site), anything else means more and more details (maybe not safe).

    View Source

    FlagOutOfDateModels

    Gets or sets a value indicating whether we should flag out-of-date models.

    Declaration
    public bool FlagOutOfDateModels { get; set; }
    Property Value
    Type Description
    bool
    View Source

    GenerateVirtualProperties

    Gets or sets a value indicating whether to mark all properties in the generated models as virtual.

    Declaration
    public bool GenerateVirtualProperties { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    Virtual properties will not work with Hot Reload when running dotnet watch.

    View Source

    IncludeVersionNumberInGeneratedModels

    Gets or sets a value indicating whether the version number should be included in generated models.

    Declaration
    public bool IncludeVersionNumberInGeneratedModels { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    By default this is written to the System.CodeDom.Compiler.GeneratedCodeAttribute output in generated code for each property of the model. This can be useful for debugging purposes but isn't essential, and it has the causes the generated code to change every time Umbraco is upgraded. In turn, this leads to unnecessary code file changes that need to be checked into source control. Default is true.

    View Source

    ModelsDirectory

    Gets or sets a value for the models directory.

    Declaration
    public string ModelsDirectory { get; set; }
    Property Value
    Type Description
    string
    Remarks

    Default is ~/umbraco/models but that can be changed.

    View Source

    ModelsMode

    Gets or sets a value for the models mode.

    Declaration
    public string ModelsMode { get; set; }
    Property Value
    Type Description
    string
    View Source

    ModelsNamespace

    Gets or sets a value for models namespace.

    Declaration
    public string ModelsNamespace { get; set; }
    Property Value
    Type Description
    string
    Remarks

    That value could be overriden by other (attribute in user's code...). Return default if no value was supplied.

    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX