Class Feature
A generic name=value (or just named) feature.
public record Feature : IEquatable<Feature>
- Inheritance
-
Feature
- Implements
- Derived
- Inherited Members
Constructors
Feature()
Initializes a new instance of the Feature class.
public Feature()
Feature(string, string?, FeatureSetPolicy)
Initializes a new instance of the Feature class.
public Feature(string name, string? value, FeatureSetPolicy setPolicy = FeatureSetPolicy.Multiple)
Parameters
name
stringThe name.
value
stringThe value.
setPolicy
FeatureSetPolicyThe set policy.
Exceptions
Properties
Name
Gets the name.
public string Name { get; init; }
Property Value
SetPolicy
The feature set policy.
public FeatureSetPolicy SetPolicy { get; init; }
Property Value
Value
Gets the value. Usually there is a value, but in some cases a feature is used just as a flag, in which case the value is null.
public string? Value { get; init; }
Property Value
Methods
ToString()
Converts to a parsable string with format NAME=VALUE
where
operator is =
for multiple, :=
for single, and
==
for single-first.
Value is enclosed in double quotes if it contains white spaces.
public override string ToString()