Search Results for

    Show / Hide Table of Contents
    View Source

    Class MediaServiceExtensions

    Media service extension methods

    Inheritance
    object
    Namespace: Umbraco.Extensions
    Assembly: Umbraco.Core.dll
    Syntax
    public static class MediaServiceExtensions
    Remarks

    Many of these have to do with UDI lookups but we don't need to add these methods to the service interface since a UDI is just a GUID and the services already support GUIDs

    Methods

    View Source

    CreateMedia(IMediaService, string, Udi, string, int)

    Declaration
    public static IMedia CreateMedia(this IMediaService mediaService, string name, Udi parentId, string mediaTypeAlias, int userId = -1)
    Parameters
    Type Name Description
    IMediaService mediaService
    string name
    Udi parentId
    string mediaTypeAlias
    int userId
    Returns
    Type Description
    IMedia
    View Source

    GetByIds(IMediaService, IEnumerable<Udi>)

    Declaration
    public static IEnumerable<IMedia> GetByIds(this IMediaService mediaService, IEnumerable<Udi> ids)
    Parameters
    Type Name Description
    IMediaService mediaService
    IEnumerable<Udi> ids
    Returns
    Type Description
    IEnumerable<IMedia>
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX