Search Results for

    Show / Hide Table of Contents
    View Source

    Class PartialViewMacroModelExtensions

    Extension methods for the PartialViewMacroModel object

    Inheritance
    System.Object
    Namespace: Umbraco.Extensions
    Assembly: Umbraco.Core.dll
    Syntax
    public static class PartialViewMacroModelExtensions

    Methods

    View Source

    GetParameterValue<T>(PartialViewMacroModel, String)

    Attempt to get a Macro parameter from a PartialViewMacroModel

    Declaration
    public static T GetParameterValue<T>(this PartialViewMacroModel partialViewMacroModel, string parameterAlias)
    Parameters
    Type Name Description
    PartialViewMacroModel partialViewMacroModel
    System.String parameterAlias
    Returns
    Type Description
    T

    Parameter value if available, the default value for the type otherwise.

    Type Parameters
    Name Description
    T
    View Source

    GetParameterValue<T>(PartialViewMacroModel, String, T)

    Attempt to get a Macro parameter from a PartialViewMacroModel and return a default value otherwise

    Declaration
    public static T GetParameterValue<T>(this PartialViewMacroModel partialViewMacroModel, string parameterAlias, T defaultValue)
    Parameters
    Type Name Description
    PartialViewMacroModel partialViewMacroModel
    System.String parameterAlias
    T defaultValue
    Returns
    Type Description
    T

    Parameter value if available, the default value that was passed otherwise.

    Type Parameters
    Name Description
    T
    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • GetParameterValue<T>(PartialViewMacroModel, String)
      • GetParameterValue<T>(PartialViewMacroModel, String, T)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX