ExperimentItemFeatureCollection
NexusLabs.Foundry.Evaluation¶
NexusLabs.Foundry.Evaluation.Experiments¶
ExperimentItemFeatureCollection Class¶
Provides exact-type access to adapter-owned features for one experiment item scope.
Inheritance System.Object 🡒 ExperimentItemFeatureCollection
Remarks¶
Feature objects remain valid for the item lifetime across repeated scope activation and deactivation. Per-activation state must be resolved through the feature rather than captured when the feature is registered.
Methods¶
ExperimentItemFeatureCollection.GetRequired<TFeature>() Method¶
Gets the feature registered for the exact requested type.
Type parameters¶
TFeature
The adapter-owned feature type.
Returns¶
TFeature
The registered feature.
Exceptions¶
System.Collections.Generic.KeyNotFoundException
The exact feature type is not registered.
ExperimentItemFeatureCollection.TryGet<TFeature>(TFeature) Method¶
Attempts to get the feature registered for the exact requested type.
Type parameters¶
TFeature
The adapter-owned feature type.
Parameters¶
feature TFeature
The registered feature when found.
Returns¶
System.Boolean
true when the exact feature type is registered.