Do fluent interfaces violate the Law of Demeter?
- by Jakub Šturc
The wikipedia article about Law of Demeter says:
The law can be stated simply as "use only one dot".
However a simple example of a fluent interface may look like this:
static void Main(string[] args)
{
new ZRLabs.Yael.Pipeline("cat.jpg")
.Rotate(90)
.Watermark("Monkey")
.RoundCorners(100, Color.Bisque)
.Save("test.png");
}
So does this goes together?