Skip to content

Commit 63823f1

Browse files
Fix code snippets (#2773)
Fix code snippets to use primary constructors correctly.
1 parent ec9aca3 commit 63823f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/testing/manage-app-host.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public async Task DisableVolumesFromTest()
162162
While the `DistributedApplicationTestingBuilder` class is useful for many scenarios, there might be situations where you want more control over starting the app host, such as executing code before the builder is created or after the app host is built. In these cases, you implement your own version of the <xref:Aspire.Hosting.Testing.DistributedApplicationFactory> class. This is what the `DistributedApplicationTestingBuilder` uses internally.
163163

164164
```csharp
165-
public class TestingAspireAppHost
165+
public class TestingAspireAppHost()
166166
: DistributedApplicationFactory(typeof(Projects.AspireApp_AppHost))
167167
{
168168
// override methods here
@@ -178,7 +178,7 @@ The `DistributionApplicationFactory` class provides several lifecycle methods th
178178
For example, we can use the `OnBuilderCreating` method to set configuration, such as the subscription and resource group information for Azure, before the app host is created and any dependent Azure resources are provisioned, resulting in our tests using the correct Azure environment.
179179

180180
```csharp
181-
public class TestingAspireAppHost : DistributedApplicationFactory(typeof(Projects.AspireApp_AppHost))
181+
public class TestingAspireAppHost() : DistributedApplicationFactory(typeof(Projects.AspireApp_AppHost))
182182
{
183183
protected override void OnBuilderCreating(DistributedApplicationOptions applicationOptions, HostApplicationBuilderSettings hostOptions)
184184
{

0 commit comments

Comments
 (0)