Search Results for

    Show / Hide Table of Contents
    View Source

    Class MediaServiceExtensions

    Media service extension methods

    Inheritance
    System.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, Int32)

    Declaration
    public static IMedia CreateMedia(this IMediaService mediaService, string name, Udi parentId, string mediaTypeAlias, int userId = 0)
    Parameters
    Type Name Description
    IMediaService mediaService
    System.String name
    Udi parentId
    System.String mediaTypeAlias
    System.Int32 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>
    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • CreateMedia(IMediaService, String, Udi, String, Int32)
      • GetByIds(IMediaService, IEnumerable<Udi>)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX