CompositeObjectSpace.PopulateAdditionalObjectSpaces(IObjectSpaceProviderService, IObjectSpaceCustomizerService) Method
Creates Object Spaces for registered Object Space Providers and adds them to the AdditionalObjectSpaces collection. Object Spaces in this collection are automatically disposed of with the owner Object Space.
Namespace: DevExpress.ExpressApp
Assembly: DevExpress.ExpressApp.v24.2.dll
NuGet Package: DevExpress.ExpressApp
Declaration
public void PopulateAdditionalObjectSpaces(
IObjectSpaceProviderService objectSpaceProvider,
IObjectSpaceCustomizerService objectSpaceCustomizerService
)
Parameters
Name | Type | Description |
---|---|---|
objectSpaceProvider | DevExpress.ExpressApp.Core.IObjectSpaceProviderService | An object that implements the |
objectSpaceCustomizerService | DevExpress.ExpressApp.Core.IObjectSpaceCustomizerService | An object that implements the |
Remarks
The following code sample demonstrates how to use this method:
using Microsoft.Extensions.DependencyInjection;
// ...
// Use Dependency Injection to access the IServiceProvider.
var objectSpaceProviderService = serviceProvider.GetRequiredService<IObjectSpaceProviderService>();
var objectSpaceCustomizerService = serviceProvider.GetRequiredService<IObjectSpaceCustomizerService>();
objectSpace.PopulateAdditionalObjectSpaces(objectSpaceProviderService, objectSpaceCustomizerService);
See Also