Struct Attribute
Definition
Namespace: StardewUI.Framework.Grammar
Assembly: StardewUI.dll
A complete attribute assignment parsed from StarML.
Inheritance
Object ⇦ ValueType ⇦ Attribute
Members
Constructors
Name | Description |
---|---|
Attribute(ReadOnlySpan<Char>, AttributeType, Boolean, AttributeValueType, ReadOnlySpan<Char>, UInt32, ReadOnlySpan<Char>) | A complete attribute assignment parsed from StarML. |
Properties
Name | Description |
---|---|
IsNegated | Whether the attribute has a negation (! ) operator before assignment. |
Name | The attribute name. |
ParentDepth | The depth to walk - i.e. number of parents to traverse - to find the context on which to evaluate a context binding. Exclusive with ParentType and only valid if the ValueType is a type that matches IsContextBinding(AttributeValueType). |
ParentType | The type name of the parent to walk up to for a context redirect. Exclusive with ParentDepth and only valid if the ValueType is a type that matches IsContextBinding(AttributeValueType). |
Type | The type of the attribute itself, i.e. how its Name should be interpreted. |
Value | The literal value text. |
ValueType | The type of the value expression, defining how the Value should be interpreted. |
Methods
Name | Description |
---|---|
Equals(Object) | (Inherited from ValueType) |
GetHashCode() | (Inherited from ValueType) |
ToString() | (Inherited from ValueType) |
Details
Constructors
Attribute(ReadOnlySpan<Char>, AttributeType, bool, AttributeValueType, ReadOnlySpan<Char>, uint, ReadOnlySpan<Char>)
A complete attribute assignment parsed from StarML.
public Attribute(ReadOnlySpan<System.Char> name, StardewUI.Framework.Grammar.AttributeType type, bool isNegated, StardewUI.Framework.Grammar.AttributeValueType valueType, ReadOnlySpan<System.Char> value, uint parentDepth, ReadOnlySpan<System.Char> parentType);
Parameters
name
ReadOnlySpan<Char>
The attribute name.
type
AttributeType
The type of the attribute itself, i.e. how its name
should be interpreted.
isNegated
Boolean
Whether the attribute has a negation (!
) operator before assignment.
valueType
AttributeValueType
The type of the value expression, defining how the value
should be interpreted.
value
ReadOnlySpan<Char>
The literal value text.
parentDepth
UInt32
The depth to walk - i.e. number of parents to traverse - to find the context on which to evaluate a context binding. Only valid if the valueType
is a type that matches IsContextBinding(AttributeValueType).
parentType
ReadOnlySpan<Char>
The type name of the parent to search for, to find the the context on which to evaluate a context binding. Exclusive with parentDepth
and only valid if the valueType
is a type that matches IsContextBinding(AttributeValueType).
Properties
IsNegated
Whether the attribute has a negation (!
) operator before assignment.
Property Value
Remarks
Negation behavior is specific to the exact attribute and is not supported for many/most attributes.
Name
The attribute name.
Property Value
ParentDepth
The depth to walk - i.e. number of parents to traverse - to find the context on which to evaluate a context binding. Exclusive with ParentType and only valid if the ValueType is a type that matches IsContextBinding(AttributeValueType).
Property Value
ParentType
The type name of the parent to walk up to for a context redirect. Exclusive with ParentDepth and only valid if the ValueType is a type that matches IsContextBinding(AttributeValueType).
Property Value
Type
The type of the attribute itself, i.e. how its Name should be interpreted.
Property Value
Value
The literal value text.
Property Value
ValueType
The type of the value expression, defining how the Value should be interpreted.