System.Collections.Generic.ICollection.Add(ZsImage)

Here are the examples of the csharp api System.Collections.Generic.ICollection.Add(ZsImage) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

3 Examples 7

19 Source : PyramidBuilder.cs
with MIT License
from zavolokas

public void AddDonorMarkup(ZsImage donorArgb)
        {
            if (donorArgb != null)
                _donors.Add(donorArgb);
        }

19 Source : PyramidTestBase.cs
with MIT License
from zavolokas

protected void PopulateImages(IList<ZsImage> images, byte levels, int w, int h)
        {
            for (int i = 0; i < levels; i++)
            {
                var image = CreateImage(w, h);
                images.Add(image);
                w /= 2;
                h /= 2;
            }
        }

19 Source : WhenCtor.cs
with MIT License
from zavolokas

[Theory]
        [InlineData(32, 32, 16, 16, 8, 7)]
        [InlineData(32, 32, 16, 17, 8, 8)]
        [InlineData(32, 32, 10, 16, 8, 8)]
        [InlineData(32, 32, 17, 16, 8, 8)]
        [InlineData(32, 32, 16, 15, 8, 8)]
        [InlineData(32, 32, 16, 16, 8, 9)]
        [InlineData(32, 32, 16, 16, 9, 8)]
        [InlineData(32, 32, 16, 16, 7, 8)]
        public void Should_Throw_WrongImageSizeException_When_Images_Not_2_Times_Smaller(int w1, int h1, int w2, int h2,
            int w3, int h3)
        {
            // Arrange
            IList<ZsImage> images = new List<ZsImage>();
            images.Add(CreateImage(w1, h1));
            images.Add(CreateImage(w2, h2));
            images.Add(CreateImage(w3, h3));

            var inpaintAreas = new List<Area2D>();
            PopulateAreas(inpaintAreas, 3, 32, 32);
            var mappings = new List<Area2DMap>();
            PopulateMappings(mappings, 3, 32, 32);

            Action act = () => { new Pyramid(images, inpaintAreas, mappings); };

            // Act & replacedert
            act.ShouldThrow<WrongImageSizeException>();
        }