AdvancedOCR.RectangularStep.WidthOf C# (CSharp) 메소드

WidthOf() 보호된 정적인 메소드

protected static WidthOf ( IList upstream ) : int
upstream IList
리턴 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;
        }