# DistributedApplicationFactory Constructors

- Package: [Aspire.Hosting.Testing](/reference/api/csharp/aspire.hosting.testing.md)
- Type: [DistributedApplicationFactory](/reference/api/csharp/aspire.hosting.testing/distributedapplicationfactory.md)
- Kind: `Constructors`
- Members: `2`

Factory for creating a distributed application for testing.

## DistributedApplicationFactory(Type, string[])

- Name: `Constructor(Type, string[])`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Testing/DistributedApplicationFactory.cs#L20-L30)

Factory for creating a distributed application for testing.

```csharp
public class DistributedApplicationFactory
{
    public DistributedApplicationFactory(
        Type entryPoint,
        string[] args)
    {
        // ...
    }
}
```

## Parameters

- `entryPoint` (`Type`)
  A type in the entry point assembly of the target Aspire AppHost. Typically, the Program class can be used.
- `args` (`string[]`)
  The command-line arguments to pass to the entry point.

## DistributedApplicationFactory(Type)

- Name: `Constructor(Type)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Testing/DistributedApplicationFactory.cs#L38-L40)

Initializes a new instance of the [DistributedApplicationFactory](/reference/api/csharp/aspire.hosting.testing/distributedapplicationfactory.md) class.

```csharp
public class DistributedApplicationFactory
{
    public DistributedApplicationFactory(
        Type entryPoint)
    {
        // ...
    }
}
```

## Parameters

- `entryPoint` (`Type`)
  A type in the entry point assembly of the target Aspire AppHost. Typically, the Program class can be used.
