forked from DevExpress-Examples/XAF_Security_E4908
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathObjectSpaceProviderFactory.cs
25 lines (21 loc) · 1.01 KB
/
ObjectSpaceProviderFactory.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Core;
using DevExpress.ExpressApp.DC;
using DevExpress.ExpressApp.Security;
using DevExpress.ExpressApp.Security.ClientServer;
using DevExpress.ExpressApp.Xpo;
namespace DevExtreme.OData.Services {
public class ObjectSpaceProviderFactory : IObjectSpaceProviderFactory {
readonly ISecurityStrategyBase security;
readonly IXpoDataStoreProvider xpoDataStoreProvider;
readonly ITypesInfo typesInfo;
public ObjectSpaceProviderFactory(ISecurityStrategyBase security, IXpoDataStoreProvider xpoDataStoreProvider, ITypesInfo typesInfo) {
this.security = security;
this.typesInfo = typesInfo;
this.xpoDataStoreProvider = xpoDataStoreProvider;
}
IEnumerable<IObjectSpaceProvider> IObjectSpaceProviderFactory.CreateObjectSpaceProviders() {
yield return new SecuredObjectSpaceProvider((ISelectDataSecurityProvider)security, xpoDataStoreProvider, typesInfo, null, true);
}
}
}