Table of Contents

Class CommandEntry

Namespace
Hi.ShellCommandUtils
Assembly
HiNc.dll

Represents a command entry with enabled state in a command list.

public class CommandEntry : IMakeXmlSource
Inheritance
CommandEntry
Implements
Inherited Members
Extension Methods

Constructors

CommandEntry(IShellCommand)

Creates a new command entry with the specified command.

public CommandEntry(IShellCommand command)

Parameters

command IShellCommand

The command to associate with this entry.

CommandEntry(XElement, string)

Creates a new command entry from XML.

public CommandEntry(XElement src, string baseDirectory)

Parameters

src XElement

Source XML element.

baseDirectory string

Base directory for relative paths.

Properties

Command

Gets or sets the command associated with this entry.

public IShellCommand Command { get; set; }

Property Value

IShellCommand

IsEnabled

Gets or sets whether this command entry is enabled.

public bool IsEnabled { get; set; }

Property Value

bool

Methods

MakeXmlSource(string, string)

Creates an XML representation of the object. This method may also generate additional resources such as related files.

public XElement MakeXmlSource(string baseDirectory, string relFile)

Parameters

baseDirectory string

The base directory for resolving relative paths

relFile string

The relative file path for the XML source

Returns

XElement

An XML element representing the object's state

Remarks

For the demand of easy moving source folder (especially project folder) without configuration file path corruption, the relative file path is applied. The baseDirectory is typically the folder at the nearest configuration file folder. Since the folder can be moving with the configuration file.