public ProtectionArea(string name, Vector3D center, double size, ProtectionAreaShape shape) { Name = name; Center = center; Size = size; Shape = shape; }
private bool TryParseShape(string shapeString, out ProtectionAreaShape shape) { switch (shapeString.ToLowerInvariant()) { case "sphere": case "spherical": shape = ProtectionAreaShape.Sphere; return(true); case "cube": case "cubic": shape = ProtectionAreaShape.Cube; return(true); } shape = ProtectionAreaShape.Cube; return(false); }
private bool TryParseShape(string shapeString, out ProtectionAreaShape shape) { switch (shapeString.ToLowerInvariant()) { case "sphere": case "spherical": shape = ProtectionAreaShape.Sphere; return true; case "cube": case "cubic": shape = ProtectionAreaShape.Cube; return true; } shape = ProtectionAreaShape.Cube; return false; }