• Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • SixLabors.ImageSharp.Web
      • CaseHandlingUriBuilder
      • CaseHandlingUriBuilder.CaseHandling
      • CommandHandling
      • ExifOrientationUtilities
      • Format
      • FormatCommand
      • FormatUtilities
      • FormattedImage
      • HMACUtilities
      • ImageCacheMetadata
      • ImageMetadata
      • RequestAuthorizationUtilities
      • Resampler
      • ResamplerCommand
    • SixLabors.ImageSharp.Web.Caching
      • ICacheHash
      • ICacheKey
      • IImageCache
      • LegacyV1CacheKey
      • PhysicalFileSystemCache
      • PhysicalFileSystemCacheOptions
      • SHA256CacheHash
      • UriAbsoluteCacheKey
      • UriAbsoluteLowerInvariantCacheKey
      • UriRelativeCacheKey
      • UriRelativeLowerInvariantCacheKey
    • SixLabors.ImageSharp.Web.Commands
      • CommandCollection
      • CommandCollectionExtensions
      • CommandParser
      • IRequestParser
      • PresetOnlyQueryCollectionRequestParser
      • PresetOnlyQueryCollectionRequestParserOptions
      • QueryCollectionRequestParser
    • SixLabors.ImageSharp.Web.Commands.Converters
      • ArrayConverter<T>
      • ColorConverter
      • EnumConverter
      • ICommandConverter
      • ICommandConverter<T>
      • IntegralNumberConverter<T>
      • ListConverter<T>
      • SimpleCommandConverter<T>
    • SixLabors.ImageSharp.Web.DependencyInjection
      • ApplicationBuilderExtensions
      • IImageSharpBuilder
      • ImageSharpBuilderExtensions
      • ServiceCollectionExtensions
    • SixLabors.ImageSharp.Web.Middleware
      • ImageCommandContext
      • ImageProcessingContext
      • ImageSharpMiddleware
      • ImageSharpMiddlewareOptions
    • SixLabors.ImageSharp.Web.Processors
      • AutoOrientWebProcessor
      • BackgroundColorWebProcessor
      • FormatWebProcessor
      • IImageWebProcessor
      • QualityWebProcessor
      • ResizeWebProcessor
    • SixLabors.ImageSharp.Web.Providers
      • FileProviderImageProvider
      • IImageProvider
      • PhysicalFileSystemProvider
      • PhysicalFileSystemProviderOptions
      • ProcessingBehavior
      • WebRootImageProvider
    • SixLabors.ImageSharp.Web.Resolvers
      • FileProviderImageResolver
      • IImageCacheResolver
      • IImageResolver
      • PhysicalFileSystemCacheResolver
    • SixLabors.ImageSharp.Web.Synchronization
      • AsyncKeyLock<TKey>
      • AsyncKeyReaderWriterLock<TKey>
      • AsyncLock
      • AsyncReaderWriterLock
      • RefCountedConcurrentDictionary<TKey, TValue>
    • SixLabors.ImageSharp.Web.TagHelpers
      • HmacTokenTagHelper
      • ImageTagHelper

    Struct ImageCacheMetadata

    Represents the metadata associated with an image file.

    Implements
    IEquatable<ImageCacheMetadata>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: SixLabors.ImageSharp.Web
    Assembly: SixLabors.ImageSharp.Web.dll
    Syntax
    public readonly struct ImageCacheMetadata : IEquatable<ImageCacheMetadata>

    Constructors

    | Edit this page View Source

    ImageCacheMetadata(DateTime, DateTime, string, TimeSpan, long)

    Initializes a new instance of the ImageCacheMetadata struct.

    Declaration
    public ImageCacheMetadata(DateTime sourceLastWriteTimeUtc, DateTime cacheLastWriteTimeUtc, string contentType, TimeSpan cacheControlMaxAge, long contentLength)
    Parameters
    Type Name Description
    DateTime sourceLastWriteTimeUtc

    The date and time in coordinated universal time (UTC) since the source file was last modified.

    DateTime cacheLastWriteTimeUtc

    The date and time in coordinated universal time (UTC) since the cache file was last modified.

    string contentType

    The content type for the source file.

    TimeSpan cacheControlMaxAge

    The maximum amount of time a resource will be considered fresh.

    long contentLength

    The length of the image in bytes.

    Properties

    | Edit this page View Source

    CacheControlMaxAge

    Gets the maximum amount of time a resource will be considered fresh.

    Declaration
    public TimeSpan CacheControlMaxAge { get; }
    Property Value
    Type Description
    TimeSpan
    | Edit this page View Source

    CacheLastWriteTimeUtc

    Gets the date and time in coordinated universal time (UTC) since the cached file was last modified.

    Declaration
    public DateTime CacheLastWriteTimeUtc { get; }
    Property Value
    Type Description
    DateTime
    | Edit this page View Source

    ContentLength

    Gets the length of the image in bytes.

    Declaration
    public long ContentLength { get; }
    Property Value
    Type Description
    long
    | Edit this page View Source

    ContentType

    Gets the content type of the source file.

    Declaration
    public string ContentType { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    SourceLastWriteTimeUtc

    Gets the date and time in coordinated universal time (UTC) since the source file was last modified.

    Declaration
    public DateTime SourceLastWriteTimeUtc { get; }
    Property Value
    Type Description
    DateTime

    Methods

    | Edit this page View Source

    Equals(ImageCacheMetadata)

    Indicates whether the current object is equal to another object of the same type.

    Declaration
    public bool Equals(ImageCacheMetadata other)
    Parameters
    Type Name Description
    ImageCacheMetadata other

    An object to compare with this object.

    Returns
    Type Description
    bool

    true if the current object is equal to the other parameter; otherwise, false.

    | Edit this page View Source

    Equals(object?)

    Indicates whether this instance and a specified object are equal.

    Declaration
    public override bool Equals(object? obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current instance.

    Returns
    Type Description
    bool

    true if obj and this instance are the same type and represent the same value; otherwise, false.

    Overrides
    ValueType.Equals(object)
    | Edit this page View Source

    FromDictionary(IDictionary<string, string>)

    Returns a new ImageCacheMetadata parsed from the given dictionary.

    Declaration
    public static ImageCacheMetadata FromDictionary(IDictionary<string, string> dictionary)
    Parameters
    Type Name Description
    IDictionary<string, string> dictionary

    The dictionary to parse and return the metadata from.

    Returns
    Type Description
    ImageCacheMetadata

    The ImageCacheMetadata.

    | Edit this page View Source

    GetHashCode()

    Returns the hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A 32-bit signed integer that is the hash code for this instance.

    Overrides
    ValueType.GetHashCode()
    | Edit this page View Source

    ReadAsync(Stream)

    Asynchronously reads and returns an ImageCacheMetadata from the input stream.

    Declaration
    public static Task<ImageCacheMetadata> ReadAsync(Stream stream)
    Parameters
    Type Name Description
    Stream stream

    The input stream.

    Returns
    Type Description
    Task<ImageCacheMetadata>

    The ImageCacheMetadata.

    | Edit this page View Source

    ToDictionary()

    Returns a new Dictionary<TKey, TValue> representing the current instance.

    Declaration
    public Dictionary<string, string> ToDictionary()
    Returns
    Type Description
    Dictionary<string, string>

    The Dictionary<TKey, TValue>.

    | Edit this page View Source

    ToString()

    Returns the fully qualified type name of this instance.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    The fully qualified type name.

    Overrides
    ValueType.ToString()
    | Edit this page View Source

    WriteAsync(Stream)

    Asynchronously writes the metadata to the target stream.

    Declaration
    public Task WriteAsync(Stream stream)
    Parameters
    Type Name Description
    Stream stream

    The target stream.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Operators

    | Edit this page View Source

    operator ==(in ImageCacheMetadata, in ImageCacheMetadata)

    Compares two ImageCacheMetadata objects for equality.

    Declaration
    public static bool operator ==(in ImageCacheMetadata left, in ImageCacheMetadata right)
    Parameters
    Type Name Description
    ImageCacheMetadata left

    The ImageCacheMetadata on the left side of the operand.

    ImageCacheMetadata right

    The ImageCacheMetadata on the right side of the operand.

    Returns
    Type Description
    bool

    True if the current left is equal to the right parameter; otherwise, false.

    | Edit this page View Source

    operator !=(in ImageCacheMetadata, in ImageCacheMetadata)

    Compares two ImageCacheMetadata objects for inequality.

    Declaration
    public static bool operator !=(in ImageCacheMetadata left, in ImageCacheMetadata right)
    Parameters
    Type Name Description
    ImageCacheMetadata left

    The ImageCacheMetadata on the left side of the operand.

    ImageCacheMetadata right

    The ImageCacheMetadata on the right side of the operand.

    Returns
    Type Description
    bool

    True if the current left is unequal to the right parameter; otherwise, false.

    Implements

    IEquatable<T>
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX