Socket
Socket
Sign inDemoInstall

com.anu-cheeki-breeki.ndesk-options

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    com.anu-cheeki-breeki.ndesk-options

Providing NDesk.Options by ANU because of missing original package in Unity PackageManager


Version published
Maintainers
1
Created

Readme

Source

NDesk.Options

An option parser for C#.


CREATED BY:Latency McLaughlin
UPDATED:11/28/2018
FRAMEWORK:.NETFramework 4.7.2, .NETStandard 2.0, .NETCore 2.1 (Latest)
LANGUAGE:C# (v7.3)
OUTPUT TYPE:API
SUPPORTS:Visual Studio 2017, 2015, 2013, 2012, 2010, 2008
TAGS:.NET, NuGet, MyGet, API, C#, Visual Studio
STATUS:Build statusndesk-options MyGet Build Status
LICENSE:License
VERSION:GitHub release

Navigation


Introduction

It takes advantage of C# features such as collection initializers and lambda delegates to provide a short, concise specification of the option names to parse, whether or not those options support values, and what to do when the option is encountered. It's entirely callback based:

History

See: http://www.ndesk.org/Options

Usage

var verbose = 0;
var show_help = false;
var names = new List<string> ();

var p = new OptionSet () {
  { "v|verbose", v => { if (v != null) ++verbose; } },
  { "h|?|help",  v => { show_help = v != null; } },
  { "n|name=",   v => { names.Add (v); } },
};
int          verbose   = 0;
bool         show_help = false;
List<string> names     = new List<string> ();

OptionSet p = new OptionSet ()
  .Add ("v|verbose", delegate (string v) { if (v != null) ++verbose; })
  .Add ("h|?|help",  delegate (string v) { show_help = v != null; })
  .Add ("n|name=",   delegate (string v) { names.Add (v); });

Installation

This library can be installed using NuGet found here.

License

MIT LICENSE

Keywords

FAQs

Last updated on 25 Oct 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc