Locator class which attempts to find suitable builders on demand.
More...
|
static IGenericBuilder | GetGenericBuilderInstanceFor (Type type) |
| Attempts to find and instantiate a generic builder for the type provided.
|
static Type | GetBuilderFor (Type type) |
| Attempts to find a GenericBuilder type which is capable of building the provided type. Will cause generation of the builder if an existing type cannot be found.
|
static Type | TryFindExistingBuilderFor (Type type) |
| Searches for an existing builder for the given type, first considering the same assembly as the provided type and then considering all assemblies within the AppDomain of the provided type.
|
static void | InvalidateBuilderTypeCache () |
| Resets the builder type cache, in case you really need that to happen.
|
static Type | FindOrGenerateDynamicBuilderFor (Type type) |
| Attempts to find a dynamic builder (ie, generated GenericBuilder type) for the provided type. Will cause generation of a new GenericBuilder implementation if an existing one cannot be found.
|
Locator class which attempts to find suitable builders on demand.
◆ FindOrGenerateDynamicBuilderFor()
Type PeanutButter.RandomGenerators.GenericBuilderLocator.FindOrGenerateDynamicBuilderFor |
( |
Type | type | ) |
|
|
static |
Attempts to find a dynamic builder (ie, generated GenericBuilder type) for the provided type. Will cause generation of a new GenericBuilder implementation if an existing one cannot be found.
- Parameters
-
type | Type to find a builder for |
- Returns
- GenericBuilder type which is capable of building the provided type
◆ GetBuilderFor()
Type PeanutButter.RandomGenerators.GenericBuilderLocator.GetBuilderFor |
( |
Type | type | ) |
|
|
static |
Attempts to find a GenericBuilder type which is capable of building the provided type. Will cause generation of the builder if an existing type cannot be found.
- Parameters
-
type | Type for which a builder is required |
- Returns
- GenericBuilder type which can be constructed and used to build!
◆ GetGenericBuilderInstanceFor()
IGenericBuilder PeanutButter.RandomGenerators.GenericBuilderLocator.GetGenericBuilderInstanceFor |
( |
Type | type | ) |
|
|
static |
Attempts to find and instantiate a generic builder for the type provided.
- Parameters
-
type | Type to find or create a builder for |
- Returns
- a builder, hopefully!
◆ TryFindExistingBuilderFor()
Type PeanutButter.RandomGenerators.GenericBuilderLocator.TryFindExistingBuilderFor |
( |
Type | type | ) |
|
|
static |
Searches for an existing builder for the given type, first considering the same assembly as the provided type and then considering all assemblies within the AppDomain of the provided type.
- Parameters
-
type | Type to search for a builder for |
- Returns
- GenericBuilder type or null if no suitable builder was found
The documentation for this class was generated from the following file:
- source/TestUtils/PeanutButter.RandomGenerators/GenericBuilderLocator.cs