SystemExt/Terminal/ApplicationChooser.cs
/// <summary>
/// Register a potential entry point with the chooser.
/// </summary>
/// <param name="entryPoint">
/// A potential entry point.
/// </param>
/// <param name="description">
/// A description of this entry point.
/// </param>
/// <param name="makeDefault">
/// Whether to make this entry point the default.
/// </param>
/// <returns>
/// This instance of <see cref="ApplicationChooser"/>.
/// </returns>
Register a potential entry point with the chooser.
Register a potential entry point with the chooser .
public ApplicationChooser AddEntryPoint(Func<string[], int> entryPoint, string description, bool makeDefault = false)
        {
            if (entryPoint == null)
                throw new ArgumentNullException("entryPoint");
            if (string.IsNullOrWhiteSpace(description))
                throw new ArgumentNullException("description");
            this.EntryPoints.Add(new KeyValuePair<Func<string[], int>, string>(entryPoint, description));
            if (makeDefault)
                this.DefaultIndex = this.EntryPoints.Count - 1;
            return this;
        }
public ApplicationChooser AddEntryPoint ( Func < string [ ] , int > entryPoint , string description , bool makeDefault = false ) { if ( entryPoint == null ) throw new ArgumentNullException ( " " ) ; if ( string . IsNullOrWhiteSpace ( description ) ) throw new ArgumentNullException ( " " ) ; this . EntryPoints . Add ( new KeyValuePair < Func < string [ ] , int > , string > ( entryPoint , description ) ) ; if ( makeDefault ) this . DefaultIndex = this . EntryPoints . Count - 1 ; return this ; }
Register a potential entry point with the chooser.
Register a potential entry point with the chooser .
This instance of .
This instance of .
entryPoint
Func<string[], int>
A potential entry point.
A potential entry point .
description
string
A description of this entry point.
A description of this entry point .
makeDefault
bool
Whether to make this entry point the default.
Whether to make this entry point the default .