PunyPngOptimizer Class

Summary

PunyPng image optimizer.
Assembly
Cake.ImageOptimizer.dll
Namespace
Cake.ImageOptimizer
Interfaces
Base Types
graph BT Type-->Base0["BaseRemoteOptimizer"] click Base0 "/api/Cake.ImageOptimizer/BaseRemoteOptimizer" Base0-->Base1["BaseOptimizer"] click Base1 "/api/Cake.ImageOptimizer/BaseOptimizer" Base1-->Base2["Object"] Type-.->Interface0["IImageOptimizer"] click Interface0 "/api/Cake.ImageOptimizer/IImageOptimizer" Type-.->Interface1["ICloneable"] Type["PunyPngOptimizer"] class Type type-node

Syntax

public class PunyPngOptimizer : BaseRemoteOptimizer, IImageOptimizer, ICloneable

Constructors

Name Summary
PunyPngOptimizer(IFileSystem, ICakeEnvironment, ICakeLog) Initializes a new instance of the PngOutOptimizer class.

Fields

Name Constant Value Summary
_Environment
Represents the environment Cake operates in.
Inherited from BaseOptimizer
_FileSystem
Represents a file system.
Inherited from BaseOptimizer
_Log
Represents a log.
Inherited from BaseOptimizer

Properties

Name Value Summary
Endpoint Uri
Gets the endpoint URL of the web service.
Extensions IList<string>
A list of extensions supported by the Optimizer
FileParameter string
Gets the parameter name of the file to be uploaded
FileSize int
Gets the maximum file size to optimize.
Inherited from BaseOptimizer
Key string
Gets or sets the PunyPng API Key
Name string
Gets the name of the optimizer.
Timeout int
Gets the maximum timespan for the request.
Inherited from BaseOptimizer

Methods

Name Value Summary
Clone() object
Creates a new object that is a copy of the current instance.
Configure(ICakeEnvironment) void
Configure the optimizer
Optimize(FilePath) ImageOptimizerResult
Optimizes the specified file.
Inherited from BaseRemoteOptimizer
PopulatePostData(FilePath) IDictionary<string, object>
Populates the request data before posting it to the web optimizer
ReadResponse(string, FilePath) ImageOptimizerResult
Read the response from the web optimizer
Supports(string) bool
Does the specified file.
Inherited from BaseOptimizer

Extension Methods

Name Value Summary
Dump<PunyPngOptimizer>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<PunyPngOptimizer>(PunyPngOptimizer[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<PunyPngOptimizer>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<PunyPngOptimizer>(string) void
Requires the Cake.Issues addin
ThrowIfNull<PunyPngOptimizer>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<PunyPngOptimizer>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
ToStringWithNullMarkup() string
Requires the Cake.Issues addin