Class DictionaryRelay
Relays a request for an System.Collections.Generic.IDictionary`2 to a request for a System.Collections.Generic.Dictionary`2 and returns the result.
Inheritance
System.Object
DictionaryRelay
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll
Syntax
[Obsolete("This relay has been deprecated, use \"new TypeRelay(typeof(IDictionary<>), typeof(Dictionary<>))\" instead.")]
public class DictionaryRelay : ISpecimenBuilder
Methods
| Improve this Doc View SourceCreate(Object, ISpecimenContext)
Creates a new specimen based on a request.
Declaration
public object Create(object request, ISpecimenContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Object | request | The request that describes what to create. |
ISpecimenContext | context | A context that can be used to create other specimens. |
Returns
Type | Description |
---|---|
System.Object | A populated System.Collections.Generic.IDictionary`2 of the appropriate item type if possible; otherwise a NoSpecimen instance. |
Remarks
If request
is a request for an
System.Collections.Generic.IDictionary`2 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.