RuleArgument

References
[IoId("00000000-cda9-47e1-b803-e439a608e58b")] public sealed class RuleArgument : IEquatable<RuleArgument>, IStorable
Rule argument. Used for instructions like RuleCommand.Tint to specify *what* colour ought to be assigned. Arguments are sometimes optional and sometimes not even allowed (for example with RuleCommand.Show instructions). In rule notation, arguments are always written last, following a " -> " substring.

Constructors

RuleArgument

#
public RuleArgument(IReader reader)
reader (IReader)

Properties

Code

#
public string Code { get; }
Gets the original text from which this argument is constructed

Empty

#
public static RuleArgument Empty { get; }

Type

#
public ArgumentType Type { get; }
Gets the kind of argument.

Value

#
public object Value { get; }
The value. The type of this object depends on Type.

Methods

Equals

#
public override bool Equals(object obj)
obj (object)
Object.Equals

Equals

#
public bool Equals(RuleArgument other)
other (RuleArgument)

GetHashCode

#
public override int GetHashCode()
Explicit

IStorable.Store

#
void IStorable.Store(IWriter writer)
writer (IWriter)
Store

Parse

#
public static RuleArgument Parse(string notation, ArgumentType allowedTypes, out string error)
notation (string)
allowedTypes (ArgumentType)
error (out string)

Parse

#
public static RuleArgument Parse(string notation, RuleCommand instruction, out string error)
notation (string)
instruction (RuleCommand)
error (out string)

ToString

#
public override string ToString()
Object.ToString