Relative Content

Tag Archive for method-chaining

How to avoid long call chains?

I have a hierarchy of objects, mostly connected by composition. I.e. (not showing the class methods for readability):

C# OOP Class Usage [duplicate]

This question already has answers here: What is the name for the idiom using method chaining to build an object? (3 answers) Closed 9 years ago. I am just being picky and really wanted some of my code to look, feel, and be used a specific way but am not sure if its possible. I […]

C# OOP Class Usage [duplicate]

This question already has answers here: What is the name for the idiom using method chaining to build an object? (3 answers) Closed 9 years ago. I am just being picky and really wanted some of my code to look, feel, and be used a specific way but am not sure if its possible. I […]

Returning the object/$this [duplicate]

This question already has answers here: Are there any actual drawbacks to self-referential method chaining? (4 answers) Closed 9 years ago. A very general question. I was thinking about method chaining, which seems useful, and began wondering if there is a reason to not return the object in a class member, as a matter of […]

Returning the object/$this [duplicate]

This question already has answers here: Are there any actual drawbacks to self-referential method chaining? (4 answers) Closed 9 years ago. A very general question. I was thinking about method chaining, which seems useful, and began wondering if there is a reason to not return the object in a class member, as a matter of […]