Méthode | Description | |
---|---|---|
DeletePicture ( Nop.Core.Domain.Media.Picture picture ) : void |
Deletes a picture
|
|
GetDefaultPictureUrl ( int targetSize, PictureType defaultPictureType = PictureType.Entity, bool useSsl = null ) : string |
Gets the default picture URL
|
|
GetPictureById ( int pictureId ) : Nop.Core.Domain.Media.Picture |
Gets a picture
|
|
GetPictureLocalPath ( Nop.Core.Domain.Media.Picture picture, int targetSize, bool showDefaultPicture = true ) : string |
Get a picture local path
|
|
GetPictureSeName ( string name ) : string |
Get picture SEO friendly name
|
|
GetPictureUrl ( Nop.Core.Domain.Media.Picture picture, int targetSize, bool showDefaultPicture = true, bool useSsl = null ) : string |
Get a picture URL
|
|
GetPictureUrl ( int pictureId, int targetSize, bool showDefaultPicture = true, bool useSsl = null ) : string |
Get a picture URL
|
|
GetPictures ( int pageIndex, int pageSize ) : IPagedList |
Gets a collection of pictures
|
|
GetPicturesByProductId ( int productId ) : IList |
Gets pictures by product identifier
|
|
GetPicturesByProductId ( int productId, int recordsToReturn ) : IList |
Gets pictures by product identifier
|
|
InsertPicture ( byte pictureBinary, string mimeType, string seoFilename, bool isNew ) : Nop.Core.Domain.Media.Picture |
Inserts a picture
|
|
LoadPictureBinary ( Nop.Core.Domain.Media.Picture picture ) : byte[] |
Gets the loaded picture binary depending on picture storage settings
|
|
LoadPictureBinary ( Nop.Core.Domain.Media.Picture picture, bool fromDb ) : byte[] |
Gets the loaded picture binary depending on picture storage settings
|
|
LoadPictureFromFile ( int pictureId, string mimeType ) : byte[] |
Loads a cpiture from file
|
|
PictureService ( IRepository |
Ctor
|
|
SetSeoFilename ( int pictureId, string seoFilename ) : Nop.Core.Domain.Media.Picture |
Updates a SEO filename of a picture
|
|
UpdatePicture ( int pictureId, byte pictureBinary, string mimeType, string seoFilename, bool isNew ) : Nop.Core.Domain.Media.Picture |
Updates the picture
|
|
ValidatePicture ( byte pictureBinary, string mimeType ) : byte[] |
Validates input picture dimensions
|
Méthode | Description | |
---|---|---|
CalculateDimensions ( |
Calculates picture dimensions whilst maintaining aspect
|
|
DeletePictureOnFileSystem ( Nop.Core.Domain.Media.Picture picture ) : void |
Delete a picture on file system
|
|
DeletePictureThumbs ( Nop.Core.Domain.Media.Picture picture ) : void |
Delete picture thumbs
|
|
GetFileExtensionFromMimeType ( string mimeType ) : string |
Returns the file extension from mime type.
|
|
GetImageCodecInfoFromExtension ( string fileExt ) : ImageCodecInfo |
Returns the first ImageCodecInfo instance with the specified extension.
|
|
GetImageCodecInfoFromMimeType ( string mimeType ) : ImageCodecInfo |
Returns the first ImageCodecInfo instance with the specified mime type.
|
|
SavePictureInFile ( int pictureId, byte pictureBinary, string mimeType ) : void |
Save picture on file system
|
protected CalculateDimensions ( |
||
originalSize | The original picture size | |
targetSize | int | The target picture size (longest side) |
Résultat |
public DeletePicture ( Nop.Core.Domain.Media.Picture picture ) : void | ||
picture | Nop.Core.Domain.Media.Picture | Picture |
Résultat | void |
protected DeletePictureOnFileSystem ( Nop.Core.Domain.Media.Picture picture ) : void | ||
picture | Nop.Core.Domain.Media.Picture | Picture |
Résultat | void |
protected DeletePictureThumbs ( Nop.Core.Domain.Media.Picture picture ) : void | ||
picture | Nop.Core.Domain.Media.Picture | Picture |
Résultat | void |
public GetDefaultPictureUrl ( int targetSize, PictureType defaultPictureType = PictureType.Entity, bool useSsl = null ) : string | ||
targetSize | int | The target picture size (longest side) |
defaultPictureType | PictureType | Default picture type |
useSsl | bool | Value indicating whether to get SSL protected picture URL; null to use the same value as the current page |
Résultat | string |
protected GetFileExtensionFromMimeType ( string mimeType ) : string | ||
mimeType | string | Mime type |
Résultat | string |
protected GetImageCodecInfoFromExtension ( string fileExt ) : ImageCodecInfo | ||
fileExt | string | File extension |
Résultat | ImageCodecInfo |
protected GetImageCodecInfoFromMimeType ( string mimeType ) : ImageCodecInfo | ||
mimeType | string | Mime type |
Résultat | ImageCodecInfo |
public GetPictureById ( int pictureId ) : Nop.Core.Domain.Media.Picture | ||
pictureId | int | Picture identifier |
Résultat | Nop.Core.Domain.Media.Picture |
public GetPictureLocalPath ( Nop.Core.Domain.Media.Picture picture, int targetSize, bool showDefaultPicture = true ) : string | ||
picture | Nop.Core.Domain.Media.Picture | Picture instance |
targetSize | int | The target picture size (longest side) |
showDefaultPicture | bool | A value indicating whether the default picture is shown |
Résultat | string |
public GetPictureSeName ( string name ) : string | ||
name | string | Name |
Résultat | string |
public GetPictureUrl ( Nop.Core.Domain.Media.Picture picture, int targetSize, bool showDefaultPicture = true, bool useSsl = null ) : string | ||
picture | Nop.Core.Domain.Media.Picture | Picture instance |
targetSize | int | The target picture size (longest side) |
showDefaultPicture | bool | A value indicating whether the default picture is shown |
useSsl | bool | Value indicating whether to get SSL protected picture URL; null to use the same value as the current page |
Résultat | string |
public GetPictureUrl ( int pictureId, int targetSize, bool showDefaultPicture = true, bool useSsl = null ) : string | ||
pictureId | int | Picture identifier |
targetSize | int | The target picture size (longest side) |
showDefaultPicture | bool | A value indicating whether the default picture is shown |
useSsl | bool | Value indicating whether to get SSL protected picture URL; null to use the same value as the current page |
Résultat | string |
public GetPictures ( int pageIndex, int pageSize ) : IPagedList |
||
pageIndex | int | Current page |
pageSize | int | Items on each page |
Résultat | IPagedList |
public GetPicturesByProductId ( int productId ) : IList |
||
productId | int | Product identifier |
Résultat | IList |
public GetPicturesByProductId ( int productId, int recordsToReturn ) : IList |
||
productId | int | Product identifier |
recordsToReturn | int | Number of records to return. 0 if you want to get all items |
Résultat | IList |
public InsertPicture ( byte pictureBinary, string mimeType, string seoFilename, bool isNew ) : Nop.Core.Domain.Media.Picture | ||
pictureBinary | byte | The picture binary |
mimeType | string | The picture MIME type |
seoFilename | string | The SEO filename |
isNew | bool | A value indicating whether the picture is new |
Résultat | Nop.Core.Domain.Media.Picture |
public LoadPictureBinary ( Nop.Core.Domain.Media.Picture picture ) : byte[] | ||
picture | Nop.Core.Domain.Media.Picture | Picture |
Résultat | byte[] |
public LoadPictureBinary ( Nop.Core.Domain.Media.Picture picture, bool fromDb ) : byte[] | ||
picture | Nop.Core.Domain.Media.Picture | Picture |
fromDb | bool | Load from database; otherwise, from file system |
Résultat | byte[] |
public LoadPictureFromFile ( int pictureId, string mimeType ) : byte[] | ||
pictureId | int | Picture identifier |
mimeType | string | MIME type |
Résultat | byte[] |
public PictureService ( IRepository |
||
pictureRepository | IRepository |
Picture repository |
productPictureRepository | IRepository |
Product picture repository |
settingService | ISettingService | Setting service |
webHelper | IWebHelper | Web helper |
eventPublisher | IEventPublisher | Event publisher |
mediaSettings | Nop.Core.Domain.Media.MediaSettings | Media settings |
Résultat | System |
protected SavePictureInFile ( int pictureId, byte pictureBinary, string mimeType ) : void | ||
pictureId | int | Picture identifier |
pictureBinary | byte | Picture binary |
mimeType | string | MIME type |
Résultat | void |
public SetSeoFilename ( int pictureId, string seoFilename ) : Nop.Core.Domain.Media.Picture | ||
pictureId | int | The picture identifier |
seoFilename | string | The SEO filename |
Résultat | Nop.Core.Domain.Media.Picture |
public UpdatePicture ( int pictureId, byte pictureBinary, string mimeType, string seoFilename, bool isNew ) : Nop.Core.Domain.Media.Picture | ||
pictureId | int | The picture identifier |
pictureBinary | byte | The picture binary |
mimeType | string | The picture MIME type |
seoFilename | string | The SEO filename |
isNew | bool | A value indicating whether the picture is new |
Résultat | Nop.Core.Domain.Media.Picture |
public ValidatePicture ( byte pictureBinary, string mimeType ) : byte[] | ||
pictureBinary | byte | Picture binary |
mimeType | string | MIME type |
Résultat | byte[] |