Browse Source

Fixed a couple of failing tests

pull/1629/head
Dmitry Pentin 5 years ago
parent
commit
f56105393b
  1. 7
      src/ImageSharp/ImageFrameCollection.cs
  2. 7
      src/ImageSharp/ImageFrameCollection{TPixel}.cs

7
src/ImageSharp/ImageFrameCollection.cs

@ -70,7 +70,12 @@ namespace SixLabors.ImageSharp
/// <param name="source">The <seealso cref="ImageFrame"/> to clone and insert into the <seealso cref="ImageFrameCollection"/>.</param>
/// <exception cref="ArgumentException">Frame must have the same dimensions as the image.</exception>
/// <returns>The cloned <see cref="ImageFrame"/>.</returns>
public ImageFrame InsertFrame(int index, ImageFrame source) => this.NonGenericInsertFrame(index, source);
public ImageFrame InsertFrame(int index, ImageFrame source)
{
this.EnsureNotDisposed();
return this.NonGenericInsertFrame(index, source);
}
/// <summary>
/// Clones the <paramref name="source"/> frame and appends the clone to the end of the collection.

7
src/ImageSharp/ImageFrameCollection{TPixel}.cs

@ -110,7 +110,12 @@ namespace SixLabors.ImageSharp
}
/// <inheritdoc />
public override int IndexOf(ImageFrame frame) => frame is ImageFrame<TPixel> specific ? this.IndexOf(specific) : -1;
public override int IndexOf(ImageFrame frame)
{
this.EnsureNotDisposed();
return frame is ImageFrame<TPixel> specific ? this.frames.IndexOf(specific) : -1;
}
/// <summary>
/// Determines the index of a specific <paramref name="frame"/> in the <seealso cref="ImageFrameCollection{TPixel}"/>.

Loading…
Cancel
Save