-
-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat/write list irenderable #1438
base: main
Are you sure you want to change the base?
Conversation
Wouldn't adding an extension method for public static void Write(this IAnsiConsole console, params IRenderable[] renderables)
{
foreach(var renderable in renderables)
{
console.Write(renderable);
}
} |
Yes, it could be. When analyzing the code, I noticed that AnsiConsole's extension methods always receive pure values ("string", double, int and others), so I thought that in this case, since it will receive an IRenderable, it would be a class method rather than an extension. I will remove these changes and just add an extension method that receives the IRenderable[] params |
I don't know why the build is breaking, I looked for the file displayed in the log and it doesn't exist
*Resolved |
…r IRenderable[] params
819c003
to
1bb1e60
Compare
Looks like a nice clean implementation @jos3s at first glance, I'll prioritise reviewing this in the coming week. |
@FrankRay78 I've already started the review |
fixes #1437
Changes
I created an overload in the Write method of the IAnsiConsole interface and implemented it in all the classes that implement this interface. The purpose of this overload is to receive a list of IRenderable objects and render them together without having to call AnsiConsole.Write for each IRenderable object.
Please upvote 👍 this pull request if you are interested in it.