Search Results for

    Show / Hide Table of Contents
    View Source

    Class ActionDescriptorApiCommonExtensions

    Provides extension methods for Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor to work with MapToApiAttribute.

    Inheritance
    object
    Namespace: Umbraco.Extensions
    Assembly: Umbraco.Cms.Api.Common.dll
    Syntax
    public static class ActionDescriptorApiCommonExtensions

    Methods

    View Source

    HasMapToApiAttribute(ActionDescriptor, string)

    Determines whether the Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor has a MapToApiAttribute with the specified API name. The check is made in runtime to support attributes added in runtime.

    Declaration
    public static bool HasMapToApiAttribute(this ActionDescriptor actionDescriptor, string apiName)
    Parameters
    Type Name Description
    ActionDescriptor actionDescriptor

    The action descriptor to inspect.

    string apiName

    The API name to check for.

    Returns
    Type Description
    bool

    true if the MapToApiAttribute is present and matches the specified API name, or if the attribute is not present and the API name matches the default API name; otherwise, false.

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