private static ICuboidEntity CuboidByLengthsCore(ICoordinateSystemEntity contextCoordinateSystem, double length, double width, double height) { string kMethod = "Cuboid.ByLengths"; if (length.LessThanOrEqualTo(0.0)) { throw new System.ArgumentException(string.Format(Properties.Resources.LessThanZero, "length"), "length"); } if (height.LessThanOrEqualTo(0.0)) { throw new System.ArgumentException(string.Format(Properties.Resources.LessThanZero, "height"), "height"); } if (width.LessThanOrEqualTo(0.0)) { throw new System.ArgumentException(string.Format(Properties.Resources.LessThanZero, "width"), "width"); } if (null == contextCoordinateSystem) { throw new System.ArgumentNullException("contextCoordinateSystem"); } if (!contextCoordinateSystem.IsScaledOrtho()) { throw new System.ArgumentException(string.Format(Properties.Resources.InvalidInput, "Shear CoordinateSystem", kMethod)); } ICuboidEntity entity = HostFactory.Factory.CuboidByLengths(contextCoordinateSystem, length, width, height); if (null == entity) { throw new System.Exception(string.Format(Properties.Resources.OperationFailed, kMethod)); } return(entity); }
private void InitializeGuaranteedProperties(ICuboidEntity entity = null) { ICuboidEntity cuboidEntity = entity; if (entity == null) { cuboidEntity = CuboidEntity; } }
private Cuboid(ICuboidEntity entity, bool persist = false) : base(entity, persist) { InitializeGuaranteedProperties(); }
private void InitializeGuaranteedProperties(ICuboidEntity entity = null) { ICuboidEntity cuboidEntity = entity; if (entity == null) cuboidEntity = CuboidEntity; }