AdvancedOCR.RectangularStep.WidthOf C# (CSharp) Method

WidthOf() protected static method

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

            int width = upstream[0].Width;

            if (!upstream.All(step => step.Width == width)) throw new ArgumentException();

            return width;
        }