public void ImmutableStateExample() { Console.WriteLine("Immutable Point"); var immutableShapePoints = PointSource.GetImmutableShapePoints(); PrintShape(immutableShapePoints); Console.WriteLine(); MoveImmutableShape(delta: 10, shapePoints: immutableShapePoints); PrintShape(immutableShapePoints); }
private void MutableStateExample() { Console.WriteLine("Mutable Point"); var shapePoints = PointSource.GetShapePoints(); PrintShape(shapePoints); Console.WriteLine(); MoveShape(delta: 10, shapePoints: shapePoints); PrintShape(shapePoints); Console.WriteLine(""); }