Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preamble segment handlers #291

Merged
merged 6 commits into from
May 16, 2021
Merged

Preamble segment handlers #291

merged 6 commits into from
May 16, 2021

Commits on May 16, 2021

  1. IJpegSegmentMetadataReader returns enumerable

    This change simplifies the code a little and improves performance, primarily by removing list allocations.
    
    Previously this method would return a materialised collection. This is not necessary, and an enumeration of directories is sufficient.
    
    This is an API change, but is unlikely to break many users as this interface is mostly used internally.
    
    It also replaces runtime casts (for .NET 3.5, where interface covariance does not exist) with compile time casts.
    drewnoakes committed May 16, 2021
    Configuration menu
    Copy the full SHA
    d5e364d View commit details
    Browse the repository at this point in the history
  2. JpegSegmentReader.ReadSegments returns list

    The method used to return an enumerable, but the type was always a list. This allows a caller to avoid creating a new list if that is what they need, and advertises that this operation is not evaluated lazily.
    drewnoakes committed May 16, 2021
    Configuration menu
    Copy the full SHA
    5b629f0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ae09090 View commit details
    Browse the repository at this point in the history
  4. Extract common code to JpegSegmentWithPreambleMetadataReader

    Several IJpegSegmentMetadataReader implementations behave in a similar manner. This commit pulls out a common base class for them, to reduce duplication and allow consistency.
    drewnoakes committed May 16, 2021
    Configuration menu
    Copy the full SHA
    3253e38 View commit details
    Browse the repository at this point in the history
  5. Use Enumerable.Empty

    drewnoakes committed May 16, 2021
    Configuration menu
    Copy the full SHA
    0fe1d7a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6c02bce View commit details
    Browse the repository at this point in the history