-
No results found.
Try your search with a different keyword or use * as a wildcard.
IPictureService.cs
using Microsoft.AspNetCore.Http;
using Nop.Core;
using Nop.Core.Domain.Catalog;
using Nop.Core.Domain.Media;
namespace Nop.Services.Media;
///
/// Picture service interface
///
public partial interface IPictureService
{
///
/// Returns the file extension from mime type.
///
/// Mime type
///
/// A task that represents the asynchronous operation
/// The task result contains the file extension
///
Task GetFileExtensionFromMimeTypeAsync(string mimeType);
///
/// Gets the loaded picture binary depending on picture storage settings
///
/// Picture
///
/// A task that represents the asynchronous operation
/// The task result contains the picture binary
///
Task LoadPictureBinaryAsync(Picture picture);
///
/// Get picture SEO friendly name
///
/// Name
///
/// A task that represents the asynchronous operation
/// The task result contains the result
///
Task GetPictureSeNameAsync(string name);
///
/// Gets the default picture URL
///
/// The target picture size (longest side)
/// Default picture type
/// Store location URL; null to use determine the current store location automatically
///
/// A task that represents the asynchronous operation
/// The task result contains the picture URL
///
Task GetDefaultPictureUrlAsync(int targetSize = 0,
PictureType defaultPictureType = PictureType.Entity,
string storeLocation = null);
///
/// Get a picture URL
///
/// Picture identifier
/// The target picture size (longest side)
/// A value indicating whether the default picture is shown
/// Store location URL; null to use determine the current store location automatically
/// Default picture type
///
/// A task that represents the asynchronous operation
/// The task result contains the picture URL
///
Task GetPictureUrlAsync(int pictureId,
int targetSize = 0,
bool showDefaultPicture = true,
string storeLocation = null,
PictureType defaultPictureType = PictureType.Entity);
///
/// Get a picture URL
///
/// Reference instance of Picture
/// The target picture size (longest side)
/// A value indicating whether the default picture is shown
/// Store location URL; null to use determine the current store location automatically
/// Default picture type
///
/// A task that represents the asynchronous operation
/// The task result contains the picture URL
///
Task<(string Url, Picture Picture)> GetPictureUrlAsync(Picture picture,
int targetSize = 0,
bool showDefaultPicture = true,
string storeLocation = null,
PictureType defaultPictureType = PictureType.Entity);
///
/// Get a picture local path
///
/// Picture instance
/// The target picture size (longest side)
/// A value indicating whether the default picture is shown
///
/// A task that represents the asynchronous operation
/// The task result contains the
///
Task GetThumbLocalPathAsync(Picture picture, int targetSize = 0, bool showDefaultPicture = true);
///
/// Gets a picture
///
/// Picture identifier
///
/// A task that represents the asynchronous operation
/// The task result contains the picture
///
Task