Class OptionSet
Implements
System.Collections.Generic.IList<Option>
System.Collections.Generic.ICollection<Option>
System.Collections.Generic.IReadOnlyList<Option>
System.Collections.Generic.IReadOnlyCollection<Option>
System.Collections.Generic.IEnumerable<Option>
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable
Inherited Members
System.Collections.ObjectModel.KeyedCollection<System.String, Mars.Components.Starter.Option>.ChangeItemKey(Mars.Components.Starter.Option, System.String)
System.Collections.ObjectModel.KeyedCollection<System.String, Mars.Components.Starter.Option>.ClearItems()
System.Collections.ObjectModel.KeyedCollection<System.String, Mars.Components.Starter.Option>.Contains(System.String)
System.Collections.ObjectModel.KeyedCollection<System.String, Mars.Components.Starter.Option>.GetKeyForItem(Mars.Components.Starter.Option)
System.Collections.ObjectModel.KeyedCollection<System.String, Mars.Components.Starter.Option>.InsertItem(System.Int32, Mars.Components.Starter.Option)
System.Collections.ObjectModel.KeyedCollection<System.String, Mars.Components.Starter.Option>.Remove(System.String)
System.Collections.ObjectModel.KeyedCollection<System.String, Mars.Components.Starter.Option>.RemoveItem(System.Int32)
System.Collections.ObjectModel.KeyedCollection<System.String, Mars.Components.Starter.Option>.SetItem(System.Int32, Mars.Components.Starter.Option)
System.Collections.ObjectModel.KeyedCollection<System.String, Mars.Components.Starter.Option>.Comparer
System.Collections.ObjectModel.KeyedCollection<System.String, Mars.Components.Starter.Option>.Dictionary
System.Collections.ObjectModel.KeyedCollection<System.String, Mars.Components.Starter.Option>.Item[System.String]
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.System.Collections.IList.get_Item(System.Int32)
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.System.Collections.IList.set_Item(System.Int32, System.Object)
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.Add(Mars.Components.Starter.Option)
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.Clear()
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.ClearItems()
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.Contains(Mars.Components.Starter.Option)
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.CopyTo(Mars.Components.Starter.Option[], System.Int32)
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.GetEnumerator()
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.IndexOf(Mars.Components.Starter.Option)
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.Insert(System.Int32, Mars.Components.Starter.Option)
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.Remove(Mars.Components.Starter.Option)
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.RemoveAt(System.Int32)
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.System.Collections.IEnumerable.GetEnumerator()
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.System.Collections.IList.Add(System.Object)
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.System.Collections.IList.Contains(System.Object)
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.System.Collections.IList.IndexOf(System.Object)
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.System.Collections.IList.Insert(System.Int32, System.Object)
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.System.Collections.IList.Remove(System.Object)
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.Count
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.Item[System.Int32]
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.Items
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.System.Collections.Generic.ICollection<Mars.Components.Starter.Option>.IsReadOnly
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.System.Collections.ICollection.IsSynchronized
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.System.Collections.ICollection.SyncRoot
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.System.Collections.IList.IsFixedSize
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.System.Collections.IList.IsReadOnly
System.Collections.ObjectModel.Collection<Mars.Components.Starter.Option>.System.Collections.IList.Item[System.Int32]
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Components.Starter
Assembly: Mars.Components.dll
Syntax
public class OptionSet : KeyedCollection<string, Option>, IList<Option>, ICollection<Option>, IReadOnlyList<Option>, IReadOnlyCollection<Option>, IEnumerable<Option>, IList, ICollection, IEnumerable
Constructors
| Improve this Doc View SourceOptionSet()
Declaration
public OptionSet()
OptionSet(Converter<String, String>)
Declaration
public OptionSet(Converter<string, string> localization)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Converter<System.String, System.String> | localization |
Properties
| Improve this Doc View SourceMessageLocalizer
Declaration
public Converter<string, string> MessageLocalizer { get; }
Property Value
| Type | Description |
|---|---|
| System.Converter<System.String, System.String> |
Methods
| Improve this Doc View SourceAdd(String, String, Action<String>, Boolean)
Declaration
public OptionSet Add(string prototype, string description, Action<string> action, bool hidden = false)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | prototype | |
| System.String | description | |
| System.Action<System.String> | action | |
| System.Boolean | hidden |
Returns
| Type | Description |
|---|---|
| OptionSet |
CreateOptionContext()
Declaration
protected OptionContext CreateOptionContext()
Returns
| Type | Description |
|---|---|
| OptionContext |
GetKeyForItem(Option)
Declaration
protected override string GetKeyForItem(Option item)
Parameters
| Type | Name | Description |
|---|---|---|
| Option | item |
Returns
| Type | Description |
|---|---|
| System.String |
Overrides
System.Collections.ObjectModel.KeyedCollection<System.String, Mars.Components.Starter.Option>.GetKeyForItem(Mars.Components.Starter.Option)
|
Improve this Doc
View Source
GetOptionParts(String, out String, out String, out String, out String)
Declaration
protected bool GetOptionParts(string argument, out string flag, out string name, out string sep, out string value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | argument | |
| System.String | flag | |
| System.String | name | |
| System.String | sep | |
| System.String | value |
Returns
| Type | Description |
|---|---|
| System.Boolean |
InsertItem(Int32, Option)
Declaration
protected override void InsertItem(int index, Option item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | |
| Option | item |
Overrides
System.Collections.ObjectModel.KeyedCollection<System.String, Mars.Components.Starter.Option>.InsertItem(System.Int32, Mars.Components.Starter.Option)
|
Improve this Doc
View Source
Parse(IEnumerable<String>)
Declaration
public List<string> Parse(IEnumerable<string> arguments)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IEnumerable<System.String> | arguments |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<System.String> |
Parse(String, OptionContext)
Declaration
protected virtual bool Parse(string argument, OptionContext c)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | argument | |
| OptionContext | c |
Returns
| Type | Description |
|---|---|
| System.Boolean |
RemoveItem(Int32)
Declaration
protected override void RemoveItem(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index |
Overrides
System.Collections.ObjectModel.KeyedCollection<System.String, Mars.Components.Starter.Option>.RemoveItem(System.Int32)
|
Improve this Doc
View Source
SetItem(Int32, Option)
Declaration
protected override void SetItem(int index, Option item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | |
| Option | item |
Overrides
System.Collections.ObjectModel.KeyedCollection<System.String, Mars.Components.Starter.Option>.SetItem(System.Int32, Mars.Components.Starter.Option)
|
Improve this Doc
View Source
WriteOptionDescriptions(TextWriter)
Declaration
public void WriteOptionDescriptions(TextWriter o)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.TextWriter | o |
Implements
System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IReadOnlyList<T>
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable