# FaultInjectionTransactionalStateAttributeMapper Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.transactions.testkit.base/orleans.transactions.testkit.faultinjectiontransactionalstateattributemapper/)

## GetFactory(ParameterInfo, FaultInjectionTransactionalStateAttribute) {#getfactory-system-reflection-parameterinfo-orleans-transactions-testkit-faultinj-941e1182}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.transactions.testkit.base/orleans.transactions.testkit.faultinjectiontransactionalstateattributemapper/methods/getfactory-system-reflection-parameterinfo-orleans-transactions-testkit-faultinj-941e1182/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Transactions.TestKit.Base/FaultInjection/ControlledInjection/FaultInjectionTransactionStateAttribute.cs#L56-L60)

```csharp
public Factory<IGrainContext, object> GetFactory(ParameterInfo parameter, FaultInjectionTransactionalStateAttribute attribute)
```

Responsible for mapping a facet metadata to a cachable factory from the parameter and facet metadata.

### Parameters

- `parameter` (`ParameterInfo`): The parameter info.
- `attribute` (`FaultInjectionTransactionalStateAttribute`): The metadata.

### Returns

The factory used to create facet instances for a grain.
