OptimizedFile Class

Summary

Details of an optimized file
Assembly
Cake.ImageOptimizer.dll
Namespace
Cake.ImageOptimizer
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["OptimizedFile"] class Type type-node

Syntax

public class OptimizedFile

Constructors

Name Summary
OptimizedFile(FilePath, string, DateTimeOffset, string, double, double) Initializes a new instance of the OptimizedFile class.

Properties

Name Value Summary
Optimized bool
Returns true if the image was optimized
OptimizedDate DateTimeOffset
Gets or sets the date the image was optimized
OptimizedHash string
Gets or sets the hash of the file after optimization
Path FilePath
Gets or sets the path to the image
SavedPercent double
Gets or sets the percentage of the image saved after optimziation
SavedSize double
Gets or sets the size difference of the image after optimziation
Service string
Gets or sets the name of the service used to optimize the image
SizeAfter double
Gets or sets the size of the image after optimziation
SizeBefore double
Gets or sets the size of the image before optimzation

Methods

Name Value Summary
DifferentService(string) bool
Returns true if the services don't match
RequiresOptimization(string) bool
Returns true if the hashes don't match

Extension Methods

Name Value Summary
Dump<OptimizedFile>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<OptimizedFile>(OptimizedFile[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<OptimizedFile>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<OptimizedFile>(string) void
Requires the Cake.Issues addin
ThrowIfNull<OptimizedFile>(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<OptimizedFile>(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