Class EnumProperty
- Namespace
- DotTiled
- Assembly
- DotTiled.dll
Represents an enum property.
public class EnumProperty : IProperty<ISet<string>>, IProperty
- Inheritance
-
EnumProperty
- Implements
- Inherited Members
Properties
Name
The name of the property.
public required string Name { get; set; }
Property Value
PropertyType
The type of the class property. This will be the name of a custom defined type in Tiled.
public required string PropertyType { get; set; }
Property Value
Type
The type of the property.
public PropertyType Type { get; }
Property Value
Value
The value of the enum property.
public required ISet<string> Value { get; set; }
Property Value
Methods
Clone()
Clones the property, only used for copying properties when performing overriding with templates.
public IProperty Clone()
Returns
- IProperty
An identical, but non-reference-equal, instance of the same property.
HasValue(string)
Determines whether the enum property has the specified value. This method is very similar to the common HasFlag(Enum) method.
public bool HasValue(string value)
Parameters
value
stringThe value to check.
Returns
- bool
True if the enum property has the specified value as one of its values; otherwise, false.
IsValue(string)
Determines whether the enum property is equal to the specified value. For enums which have multiple values (e.g. flag enums), this method will only return true if it is the only value.
public bool IsValue(string value)
Parameters
value
stringThe value to check.
Returns
- bool
True if the enum property is equal to the specified value; otherwise, false.