AdvancedOCR.RectangularStep.HeightOf C# (CSharp) Method

HeightOf() protected static method

protected static HeightOf ( IList upstream ) : int
upstream IList
return int
        protected static int HeightOf(IList<RectangularStep> upstream)
        {
            if (upstream == null || upstream.Count == 0) throw new ArgumentException();

            int height = upstream[0].Height;

            if (!upstream.All(step => step.Height == height)) throw new ArgumentException();

            return height;
        }