https://github.com/rsm-hcd/andculturecode.csharp.cli
Common utiltiies when build CSharp CLIs at andculture
https://github.com/rsm-hcd/andculturecode.csharp.cli
cli csharp dotnet-core hacktoberfest
Last synced: 6 months ago
JSON representation
Common utiltiies when build CSharp CLIs at andculture
- Host: GitHub
- URL: https://github.com/rsm-hcd/andculturecode.csharp.cli
- Owner: rsm-hcd
- License: apache-2.0
- Created: 2020-06-11T12:55:13.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-04-29T11:44:35.000Z (about 3 years ago)
- Last Synced: 2024-12-03T04:38:46.460Z (6 months ago)
- Topics: cli, csharp, dotnet-core, hacktoberfest
- Language: C#
- Homepage:
- Size: 142 KB
- Stars: 1
- Watchers: 8
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# AndcultureCode.CSharp.Cli

[](https://codecov.io/gh/AndcultureCode/AndcultureCode.CSharp.Cli)
[](#contributors-)Commonly used utilities when building CSharp CLIs for .NET Core C#
## Getting Started
This package is installed via NuGet
```
dotnet add [] package AndcultureCode.CSharp.Cli
```After installation, simply import the extensions namespace to gain access
to all of the available utilities.
```csharp
using System;
using System.Collection.Generic;
using AndcultureCode.CSharp.Cli;public class MyCommand : Command
{
#region Protected Propertiesprotected override string _commandDescription => "Top level command for that does something helpful";
#endregion Protected Properties
#region Constructor
public MyCommand(
CommandLineApplication command,
IConfigurationRoot configurationRoot,
IServiceCollection serviceCollection
) : base(command, configurationRoot, serviceCollection)
{
}#endregion Constructor
#region Protected Methods
protected override void RegisterSubCommands()
{
_command.Command("mySubCommand", cmd => new MySubCommand(cmd, _configurationRoot, _serviceCollection));
}#endregion Protected Methods
}
```## Documentation
[Full API Documentation](src/AndcultureCode.CSharp.Cli/AndcultureCode.CSharp.Cli.md)
## Development Setup
* Install Dotnet Core 2.x
* Install the `and-cli` tooling found at [AndcultureCode.Cli](https://github.com/AndcultureCode/AndcultureCode.Cli)Below are a few basics to get you started, but there are many more commands and options for managing this and other projects found in the `and-cli`.
### Building project
* Run the build command
```
and-cli dotnet --build
```### Running tests along with code coverage
* Run the test command
```
and-cli dotnet-test
```
* Open the `coverage/index.htm` file in your browser### Publishing a new version
* Run the publish command with the next version number ([See semver package versioning](https://docs.microsoft.com/en-us/nuget/concepts/package-versioning))
```
and-cli nuget --publish
```Contributing
======Information on contributing to this repo is in the [Contributing Guide](CONTRIBUTING.md)
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!