• Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • SixLabors.ImageSharp.Web
      • FormattedImage
      • FormatUtilities
      • ImageCacheMetadata
      • ImageMetadata
    • SixLabors.ImageSharp.Web.Caching
      • CacheHash
      • ICacheHash
      • IImageCache
      • PhysicalFileSystemCache
      • PhysicalFileSystemCacheOptions
    • SixLabors.ImageSharp.Web.Commands
      • CommandParser
      • DictionaryExtensions
      • IRequestParser
      • PresetOnlyQueryCollectionRequestParser
      • PresetOnlyQueryCollectionRequestParserOptions
      • QueryCollectionRequestParser
    • SixLabors.ImageSharp.Web.Commands.Converters
      • ICommandConverter
      • ICommandConverter<T>
    • SixLabors.ImageSharp.Web.DependencyInjection
      • ApplicationBuilderExtensions
      • IImageSharpBuilder
      • ImageSharpBuilderExtensions
      • ImageSharpConfiguration
      • ServiceCollectionExtensions
    • SixLabors.ImageSharp.Web.Middleware
      • ConcurrentDictionaryExtensions
      • ImageCommandContext
      • ImageProcessingContext
      • ImageSharpMiddleware
      • ImageSharpMiddlewareOptions
    • SixLabors.ImageSharp.Web.Processors
      • BackgroundColorWebProcessor
      • FormatWebProcessor
      • IImageWebProcessor
      • JpegQualityWebProcessor
      • ResizeWebProcessor
    • SixLabors.ImageSharp.Web.Providers
      • IImageProvider
      • PhysicalFileSystemProvider
      • ProcessingBehavior
    • SixLabors.ImageSharp.Web.Resolvers
      • IImageCacheResolver
      • IImageResolver
      • PhysicalFileSystemCacheResolver
      • PhysicalFileSystemResolver
    • SixLabors.ImageSharp.Web.Synchronization
      • AsyncKeyLock<TKey>
      • AsyncKeyReaderWriterLock<TKey>
      • AsyncLock
      • AsyncReaderWriterLock
      • RefCountedConcurrentDictionary<TKey, TValue>

    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

    | Improve this Doc View Source

    ImageCacheMetadata(DateTime, DateTime, String, TimeSpan, Int64)

    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.

    Int64 contentLength

    The length of the image in bytes.

    Properties

    | Improve this Doc View Source

    CacheControlMaxAge

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

    Declaration
    public readonly TimeSpan CacheControlMaxAge { get; }
    Property Value
    Type Description
    TimeSpan
    | Improve this Doc View Source

    CacheLastWriteTimeUtc

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

    Declaration
    public readonly DateTime CacheLastWriteTimeUtc { get; }
    Property Value
    Type Description
    DateTime
    | Improve this Doc View Source

    ContentLength

    Gets the length of the image in bytes.

    Declaration
    public readonly long ContentLength { get; }
    Property Value
    Type Description
    Int64
    | Improve this Doc View Source

    ContentType

    Gets the content type of the source file.

    Declaration
    public readonly string ContentType { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    SourceLastWriteTimeUtc

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

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

    Methods

    | Improve this Doc View Source

    Equals(ImageCacheMetadata)

    Declaration
    public readonly bool Equals(ImageCacheMetadata other)
    Parameters
    Type Name Description
    ImageCacheMetadata other
    Returns
    Type Description
    Boolean
    | Improve this Doc View Source

    Equals(Object)

    Declaration
    public override readonly bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean
    Overrides
    ValueType.Equals(Object)
    | Improve this Doc 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.

    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override readonly int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    ValueType.GetHashCode()
    | Improve this Doc View Source

    ReadAsync(Stream)

    Asynchronously reads and returns an ImageCacheMetadata from the input stream.

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

    The input stream.

    Returns
    Type Description
    Task<ImageCacheMetadata>

    The ImageCacheMetadata.

    | Improve this Doc View Source

    ToDictionary()

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

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

    The Dictionary<TKey,TValue>.

    | Improve this Doc View Source

    ToString()

    Declaration
    public override readonly string ToString()
    Returns
    Type Description
    String
    Overrides
    ValueType.ToString()
    | Improve this Doc View Source

    WriteAsync(Stream)

    Asynchronously writes the metadata to the target stream.

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

    The target stream.

    Returns
    Type Description
    Task

    A Task representing the asynchronous operation.

    Operators

    | Improve this Doc View Source

    Equality(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
    Boolean

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

    | Improve this Doc View Source

    Inequality(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
    Boolean

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

    Implements

    System.IEquatable<T>
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX