Skip to content

Commit dd24aca

Browse files
committed
Updated docs to reference .NET 10
1 parent 7f1a15d commit dd24aca

23 files changed

Lines changed: 43 additions & 76 deletions

Cofoundry.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{4996A61A-00E1-4363-9BC7-1F877E4AD933}"
77
ProjectSection(SolutionItems) = preProject
88
src\Directory.Build.props = src\Directory.Build.props
9+
README.md = README.md
910
EndProjectSection
1011
EndProject
1112
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{8FCDFF68-9BCF-499B-8E2D-7E08E824F40A}"

docs/user-docs/Framework/Background Tasks.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ public class ImportDataBackgroundTask : IAsyncRecurringBackgroundTask
1313
{
1414
private readonly IDomainRepository _domainRepository;
1515

16-
public ImportDataBackgroundTask(
17-
IDomainRepository domainRepository
18-
)
16+
public ImportDataBackgroundTask(IDomainRepository domainRepository)
1917
{
2018
_domainRepository = domainRepository;
2119
}
@@ -37,8 +35,7 @@ public class BackgroundTaskRegistration : IBackgroundTaskRegistration
3735
{
3836
public void Register(IBackgroundTaskScheduler scheduler)
3937
{
40-
scheduler
41-
.RegisterRecurringTask<ImportDataBackgroundTask>(1, 6, 5);
38+
scheduler.RegisterRecurringTask<ImportDataBackgroundTask>(1, 6, 5);
4239
}
4340
}
4441
```

docs/user-docs/Framework/Caching.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,7 @@ public class ImageAssetCache
5050
private const string IMAGE_ASSET_RENDER_DETAILS_CACHEKEY = "ImageAssetRenderDetails:";
5151
private readonly IObjectCache _cache;
5252

53-
public ImageAssetCache(
54-
IObjectCacheFactory cacheFactory
55-
)
53+
public ImageAssetCache(IObjectCacheFactory cacheFactory)
5654
{
5755
_cache = cacheFactory.Get("COF_ImageAssets");
5856
}

docs/user-docs/Framework/Configuration Settings.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ public class ContactController : Controller
4747
{
4848
private readonly ContactFormSettings _simpleTestSiteSettings;
4949

50-
public ContactController(
51-
ContactFormSettings simpleTestSiteSettings
52-
)
50+
public ContactController(ContactFormSettings simpleTestSiteSettings)
5351
{
5452
_simpleTestSiteSettings = simpleTestSiteSettings;
5553
}

docs/user-docs/Framework/Data Access/Entity Framework & DbContext Tools.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,7 @@ public class SetCatFavoriteCommandHandler
113113
new SqlParameter("@CatId", command.CatId),
114114
new SqlParameter("@UserId", executionContext.UserContext.UserId),
115115
new SqlParameter("@IsLiked", command.IsFavorite),
116-
new SqlParameter("@CreateDate", executionContext.ExecutionDate)
117-
);
116+
new SqlParameter("@CreateDate", executionContext.ExecutionDate));
118117
}
119118
}
120119
```

docs/user-docs/Framework/Data Access/Transactions.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ public class AddProductHandler
1515
public AddProductHandler(
1616
MyDbContext myDbContext,
1717
ITransactionScopeManager transactionScopeManager,
18-
ICommandExecutor commandExecutor
19-
)
18+
ICommandExecutor commandExecutor)
2019
{
2120
_myDbContext = myDbContext;
2221
_transactionScopeManager = transactionScopeManager;
@@ -57,9 +56,7 @@ public class TransactionExample
5756
{
5857
private readonly IAdvancedContentRepository _contentRepository;
5958

60-
public TransactionExample(
61-
IAdvancedContentRepository contentRepository
62-
)
59+
public TransactionExample(IAdvancedContentRepository contentRepository)
6360
{
6461
_contentRepository = contentRepository;
6562
}
@@ -166,9 +163,7 @@ public class TransactionExample
166163
{
167164
private readonly IAdvancedContentRepository _contentRepository;
168165

169-
public TransactionExample(
170-
IAdvancedContentRepository contentRepository
171-
)
166+
public TransactionExample(IAdvancedContentRepository contentRepository)
172167
{
173168
_contentRepository = contentRepository;
174169
}

docs/user-docs/Framework/Dependency Injection.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ public class MyAssemblyDiscoveryRule : IAssemblyDiscoveryRule
9191
{
9292
public bool CanInclude(
9393
RuntimeLibrary libraryToCheck,
94-
IAssemblyDiscoveryRuleContext context
95-
)
94+
IAssemblyDiscoveryRuleContext context)
9695
{
9796
return libraryToCheck.Name.StartsWith("MyNamespace.");
9897
}
@@ -106,8 +105,8 @@ public class MyAssemblyDiscoveryRule : IAssemblyDiscoveryRule
106105
builder
107106
.Services
108107
.AddMvc()
109-
.AddCofoundry(builder.Configuration, c =>
108+
.AddCofoundry(builder.Configuration, config =>
110109
{
111-
c.AssemblyDiscoveryRules.Add(new MyAssemblyDiscoveryRule());
110+
config.AssemblyDiscoveryRules.Add(new MyAssemblyDiscoveryRule());
112111
});
113112
```

docs/user-docs/Framework/JSON Configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ This can be done in your `Program.cs` file by re-applying the `AddNewtonsoftJson
2525
builder.Services
2626
.AddMvc()
2727
.AddCofoundry(builder.Configuration)
28-
.AddNewtonsoftJson(o =>
28+
.AddNewtonsoftJson(options =>
2929
{
3030
// e.g. reset the contract resolver to use PascalCase.
31-
o.SerializerSettings.ContractResolver = new DefaultContractResolver();
32-
JsonConvert.DefaultSettings = () => o.SerializerSettings;
31+
options.SerializerSettings.ContractResolver = new DefaultContractResolver();
32+
JsonConvert.DefaultSettings = () => options.SerializerSettings;
3333
});
3434
```
3535

docs/user-docs/Framework/Message Aggregator.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ public class BlogPostDeletedMessageHandler : IMessageHandler<CustomEntityDeleted
1717
{
1818
private readonly IExampleSearchIndexRepository _exampleSearchIndexRepository;
1919

20-
public BlogPostDeletedMessageHandler(
21-
IExampleSearchIndexRepository exampleSearchIndexRepository
22-
)
20+
public BlogPostDeletedMessageHandler(IExampleSearchIndexRepository exampleSearchIndexRepository)
2321
{
2422
_exampleSearchIndexRepository = exampleSearchIndexRepository;
2523
}
@@ -108,9 +106,7 @@ public class AddPageCommandHandler
108106
{
109107
private readonly IMessageAggregator _messageAggregator;
110108

111-
public AddPageCommandHandler(
112-
IMessageAggregator messageAggregator
113-
)
109+
public AddPageCommandHandler(IMessageAggregator messageAggregator)
114110
{
115111
_messageAggregator = messageAggregator;
116112
}

docs/user-docs/Framework/Roles & Permissions/Authorizing CQS Handlers.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ public class DeleteCustomEntityCommandHandler
6767

6868
public DeleteCustomEntityCommandHandler(
6969
CofoundryDbContext dbContext,
70-
IPermissionValidationService permissionValidationService
71-
)
70+
IPermissionValidationService permissionValidationService)
7271
{
7372
_dbContext = dbContext;
7473
_permissionValidationService = permissionValidationService;

0 commit comments

Comments
 (0)