Skip to content

Instantly share code, notes, and snippets.

@drewburlingame
drewburlingame / 1hr_8speakers_podcast.mp3
Last active November 4, 2025 14:38
1hr_8speakers_podcast.mp3
This file has been truncated, but you can view the full file.

WIP

There a several frameworks for building console apps in dotnet. Here's a list and brief summary.

This is the Microsoft framework. Commands are defined using a builder interface. There's a package called DragonFruit to define commands with methods. It's in alpha at the time of this writing.

Some other perks:

@drewburlingame
drewburlingame / CustomerArgs.cs
Created December 6, 2018 21:40
CustomerArgs for CommandDotNet. Uses CustomerService decorator to filter customers based on cli options. Depends on SimpleInjectorMapperCommandInvoker
public class CustomerArgs : IArgumentModel
{
public bool? isSelectAll;
public string[] Customers { get; set; }
public bool SelectAll => this.isSelectAll.HasValue
? this.isSelectAll.Value
: (this.isSelectAll = this.Customers.Any(c => c == "*")).Value ;
}