Class TraitRequirement
Inheritance
TraitRequirement
Syntax
public class TraitRequirement : IEquatable<TraitRequirement>, IEquatable<TraitDefinition>
Constructors
TraitRequirement(String, Type, Boolean)
Declaration
public TraitRequirement(string traitName, Type type, bool required = true)
Parameters
TraitRequirement(TraitDefinition, Boolean)
Declaration
public TraitRequirement(TraitDefinition definition, bool required = true)
Parameters
Fields
Definition
The definition of the trait
Declaration
public readonly TraitDefinition Definition
Field Value
Required
Whether the trait is required for the query to match or Action to function.
If false, this trait is optional, which means it will show up in the
QueryResult only if present for the data that the query matched against.
Declaration
public readonly bool Required
Field Value
Properties
TraitName
Declaration
public string TraitName { get; }
Property Value
Type
The type of the trait's value
Declaration
public Type Type { get; }
Property Value
Methods
Equals(TraitDefinition)
Declaration
public bool Equals(TraitDefinition other)
Parameters
Returns
Equals(TraitRequirement)
Declaration
public bool Equals(TraitRequirement other)
Parameters
Returns
FromSerialized(SerializedTraitRequirement)
Declaration
public static TraitRequirement FromSerialized(SerializedTraitRequirement requirement)
Parameters
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
Implicit(TraitDefinition to TraitRequirement)
Declaration
public static implicit operator TraitRequirement(TraitDefinition definition)
Parameters
Returns
Implicit(TraitRequirement to TraitDefinition)
Declaration
public static implicit operator TraitDefinition(TraitRequirement requirement)
Parameters
Returns