Class DictionaryRelay
Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll
Relays a request for an IDictionary%602 to a request for a
Dictionary%602 and returns the result.
[Obsolete("This relay has been deprecated, use \"new TypeRelay(typeof(IDictionary<>), typeof(Dictionary<>))\" instead.")]
public class DictionaryRelay : ISpecimenBuilderInheritance
Implements
Inherited Members
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Extension Methods
SpecimenFactory.Create<T>(ISpecimenBuilder), SpecimenFactory.CreateMany<T>(ISpecimenBuilder), SpecimenFactory.CreateMany<T>(ISpecimenBuilder, int), SpecimenCommand.Do<T>(ISpecimenBuilder, Action<T>), SpecimenCommand.Do<T1, T2>(ISpecimenBuilder, Action<T1, T2>), SpecimenCommand.Do<T1, T2, T3>(ISpecimenBuilder, Action<T1, T2, T3>), SpecimenCommand.Do<T1, T2, T3, T4>(ISpecimenBuilder, Action<T1, T2, T3, T4>), SpecimenQuery.Get<T, TResult>(ISpecimenBuilder, Func<T, TResult>), SpecimenQuery.Get<T1, T2, TResult>(ISpecimenBuilder, Func<T1, T2, TResult>), SpecimenQuery.Get<T1, T2, T3, TResult>(ISpecimenBuilder, Func<T1, T2, T3, TResult>), SpecimenQuery.Get<T1, T2, T3, T4, TResult>(ISpecimenBuilder, Func<T1, T2, T3, T4, TResult>), CustomizationExtensions.ToCustomization(ISpecimenBuilder)
Constructors
DictionaryRelay()
public DictionaryRelay()Methods
Create(object, ISpecimenContext)
Creates a new specimen based on a request.
public object Create(object request, ISpecimenContext context)Parameters
request object
The request that describes what to create.
context ISpecimenContext
A context that can be used to create other specimens.
Returns
A populated IDictionary%602 of the appropriate item type if
possible; otherwise a NoSpecimen instance.
Remarks
If request is a request for an
`IDictionary%602` and context can satisfy a
request for a populated specimen of that type, this value will be returned. If not, the
return value is a `NoSpecimen` instance.