ExperimentVariant
Namespace AgentPrism · Assembly
AgentPrism.Abstractions.dllDefines one experiment variant: its definition version and traffic weight.
public sealed record ExperimentVariant : IEquatable<ExperimentVariant>Inheritance
Section titled “Inheritance”Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
Section titled “Constructors”ExperimentVariant()
Section titled “ ExperimentVariant()”public ExperimentVariant()Properties
Section titled “Properties”Gets the variant name, for example "control" or "v3". It must be
unique within the experiment.
public required string Name { get; init; }Property Value
Section titled “Property Value”Version
Section titled “ Version”Gets the AgentDefinition.Version number to serve.
public required int Version { get; init; }Property Value
Section titled “Property Value”Weight
Section titled “ Weight”Gets the traffic weight from 0 through 100. The weights of all experiment variants must total exactly 100 or saving is rejected. See Experiment.
public required int Weight { get; init; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Equals(object?)
Section titled “ Equals(object?)”public override bool Equals(object? obj)Parameters
Section titled “Parameters”obj object?
Returns
Section titled “Returns”Equals(ExperimentVariant?)
Section titled “ Equals(ExperimentVariant?)”public bool Equals(ExperimentVariant? other)Parameters
Section titled “Parameters”other ExperimentVariant?
Returns
Section titled “Returns”GetHashCode()
Section titled “ GetHashCode()”public override int GetHashCode()Returns
Section titled “Returns”ToString()
Section titled “ ToString()”public override string ToString()Returns
Section titled “Returns”Operators
Section titled “Operators”operator ==(ExperimentVariant?, ExperimentVariant?)
Section titled “ operator ==(ExperimentVariant?, ExperimentVariant?)”public static bool operator ==(ExperimentVariant? left, ExperimentVariant? right)Parameters
Section titled “Parameters”left ExperimentVariant?
right ExperimentVariant?
Returns
Section titled “Returns”operator !=(ExperimentVariant?, ExperimentVariant?)
Section titled “ operator !=(ExperimentVariant?, ExperimentVariant?)”public static bool operator !=(ExperimentVariant? left, ExperimentVariant? right)Parameters
Section titled “Parameters”left ExperimentVariant?
right ExperimentVariant?