Skip to main content
All docs
V25.1
  • .NET 8.0+
    • The page you are viewing does not exist in the .NET Framework 4.6.2+ platform documentation. This link will take you to the parent topic of the current section.

    XPObjectSpaceProviderOptions.CustomCreateObjectSpaceProvider Property

    Allows you to create a custom Object Space provider.

    Namespace: DevExpress.ExpressApp.ApplicationBuilder

    Assembly: DevExpress.ExpressApp.Xpo.v25.1.dll

    NuGet Package: DevExpress.ExpressApp.Xpo

    Declaration

    public Func<CustomCreateObjectSpaceProviderContext, IObjectSpaceProvider> CustomCreateObjectSpaceProvider { get; set; }

    Property Value

    Type Description
    Func<CustomCreateObjectSpaceProviderContext, IObjectSpaceProvider>

    A delegate that accepts an instance of CustomCreateObjectSpaceProviderContext and must return the custom Object Space provider.

    Remarks

    You can use this property to create a custom Object Space provider in WinForms, Blazor, and WebAPI applications that use Integrated Security or no security tier.

    builder.ObjectSpaceProviders 
        .AddSecuredXpo((serviceProvider, options) => { 
            options.ConnectionString = ...; 
            options.EnablePoolingInConnectionString = ...; 
            options.ThreadSafe = ...; 
            // ... 
            var dataStoreProvider = XPObjectSpaceProvider.GetDataStoreProvider(options.ConnectionString, null, true); 
            options.CustomCreateObjectSpaceProvider = (context) => { 
                var selectDataSecurityProvider = context.ServiceProvider.GetRequiredService<ISelectDataSecurityProvider>(); 
                return new MyCustomObjectSpaceProvider(context.ServiceProvider, selectDataSecurityProvider, dataStoreProvider, ...); 
            }; 
        }) 
    
    See Also