Class CommandSwitch
Used to indicate the different ways a command can be called on the commandline.
Inheritance
System.Object
CommandSwitch
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Petabridge.Cmd
Assembly: cs.temp.dll.dll
Syntax
public sealed class CommandSwitch
Constructors
CommandSwitch(HashSet<String>)
Creates a new CommandSwitch based on a list of provided switches.
Declaration
public CommandSwitch(HashSet<string> switches)
Parameters
Type | Name | Description |
---|---|---|
HashSet<System.String> | switches | The set of provided switches. |
CommandSwitch(IEnumerable<String>)
Creates a new CommandSwitch based on a list of provided switches.
Declaration
public CommandSwitch(IEnumerable<string> switches)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<System.String> | switches | The set of provided switches. |
Fields
Empty
An empty CommandSwitch instance.
Declaration
public static readonly CommandSwitch Empty
Field Value
Type | Description |
---|---|
CommandSwitch |
Properties
Switches
The set of switches supported by this command.
Declaration
public ICollection<string> Switches { get; }
Property Value
Type | Description |
---|---|
ICollection<System.String> |
Methods
Contains(String)
Check to see if this CommandSwitch contains an individual switch value.
Declaration
public bool Contains(string s)
Parameters
Type | Name | Description |
---|---|---|
System.String | s | The switch value to check. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
System.Object.Equals(System.Object)
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
System.Object.GetHashCode()
Overlap(CommandSwitch)
Check to see if two switches overlap with each other.
Declaration
public IEnumerable<string> Overlap(CommandSwitch other)
Parameters
Type | Name | Description |
---|---|---|
CommandSwitch | other | The other CommandSwitch to check. |
Returns
Type | Description |
---|---|
IEnumerable<System.String> | The set of overlapping values. |