Пример #1
0
        /// <summary>
        /// Действие по инициализации.
        /// </summary>
        /// <param name="moduleProvider">Провайдер модулей.</param>
        protected override async ValueTask <Nothing> OnInitialize(IModuleProvider moduleProvider)
        {
            await base.OnInitialize(moduleProvider);

            ObjectSerializationService = await moduleProvider.QueryModuleAsync <IObjectSerializationService, object>(null);

            return(Nothing.Value);
        }
Пример #2
0
        /// <summary>
        /// Инициализировать объект.
        /// </summary>
        /// <param name="modules">Модули.</param>
        public virtual async ValueTask <Nothing> Initialize(IModuleProvider modules)
        {
            ModuleProvider           = modules;
            LinkSerializationService = await modules.QueryModuleAsync <ILinkSerializationService>() ?? throw new ModuleNotFoundException(typeof(ILinkSerializationService));

            ObjectSerializationService = await modules.QueryModuleAsync <IObjectSerializationService>() ?? throw new ModuleNotFoundException(typeof(IObjectSerializationService));

            return(Nothing.Value);
        }
Пример #3
0
 public LoginFunctionBase(IObjectSerializationService objectSerializationService, ITokenBuilder tokenBuilder)
 {
     this.objectSerializationService = objectSerializationService;
     this.tokenBuilder = tokenBuilder;
 }
 public XafXpoLoginFunction(IObjectSerializationService objectSerializationService, ITokenBuilder tokenBuilder, IResolver <IXpoInitializer> XpoInitializerResolver) : base(objectSerializationService, tokenBuilder, XpoInitializerResolver)
 {
 }
        public static IServiceCollection AddXpoWebApi(this IServiceCollection serviceCollection, IResolver <IDataStore> dataStoreResolver, IStringSerializationService stringSerializationHelper, IObjectSerializationService simpleObjectSerializationService)
        {
            IFunction function = new DataStoreFunctionServer(dataStoreResolver, simpleObjectSerializationService);

            serviceCollection.AddSingleton <IResolver <IDataStore> >(dataStoreResolver);
            serviceCollection.AddSingleton <IStringSerializationService>(stringSerializationHelper);
            serviceCollection.AddSingleton <IObjectSerializationService>(simpleObjectSerializationService);
            serviceCollection.AddSingleton <IFunction>(function);

            return(serviceCollection);
        }
 public static IServiceCollection AddXpoWebApi(this IServiceCollection serviceCollection, string appsettingsjson, IStringSerializationService stringSerializationHelper, IObjectSerializationService simpleObjectSerializationHelper)
 {
     return(serviceCollection.AddXpoWebApi(new XpoDataStoreResolver(appsettingsjson), stringSerializationHelper, simpleObjectSerializationHelper));
 }
 public static IServiceCollection AddXpoWebApiWithDal(this IServiceCollection serviceCollection, IResolver <IDataStore> dataStoreResolver, IStringSerializationService stringSerializationHelper, IObjectSerializationService simpleObjectSerializationService, IResolver <IXpoInitializer> XpoInitializerResolver)
 {
     serviceCollection.AddSingleton <IResolver <IXpoInitializer> >(XpoInitializerResolver);
     return(serviceCollection.AddXpoWebApi(dataStoreResolver, stringSerializationHelper, simpleObjectSerializationService));
 }
        public static IServiceCollection AddXpoWebApiWithDal(this IServiceCollection serviceCollection, string appsettingsjson, IStringSerializationService stringSerializationHelper, IObjectSerializationService simpleObjectSerializationHelper, params Type[] entityTypes)
        {
            XpoDataStoreResolver dataStoreResolver = new XpoDataStoreResolver(appsettingsjson);

            return(AddXpoWebApiWithDal(serviceCollection, dataStoreResolver, stringSerializationHelper, simpleObjectSerializationHelper, new XpoInitializerResolver(dataStoreResolver, entityTypes)));
            //return serviceCollection.AddXpoWebApi(dataStoreResolver, stringSerializationHelper, simpleObjectSerializationHelper);
        }
Пример #9
0
 public FunctionDataStore(IFunction functionClient, IObjectSerializationService objectSerializationHelper, AutoCreateOption autoCreateOption)
 {
     this.FunctionClient            = functionClient;
     this.objectSerializationHelper = objectSerializationHelper;
 }
Пример #10
0
 public XpoLoginFunctionBase(IObjectSerializationService objectSerializationService, ITokenBuilder tokenBuilder, IResolver <IXpoInitializer> XpoInitializerResolver) : base(objectSerializationService, tokenBuilder)
 {
     this.XpoInitializerResolver = XpoInitializerResolver;
 }
Пример #11
0
 public DataStoreControllerBase(IDataStore dataStore, IObjectSerializationService objectSerializationService)
 {
     this.dataStore = dataStore;
     this.objectSerializationService = objectSerializationService;
 }
 public DataStoreFunctionServer(IResolver <IDataStore> configResolver, IObjectSerializationService objectSerializationService)
 {
     ConfigResolver             = configResolver;
     ObjectSerializationService = objectSerializationService;
 }
 public SyncController(IObjectSerializationService objectSerializationService, ISyncDataStore MasterDS) : base(objectSerializationService, MasterDS)
 {
 }
 public XpoWebApiProvider(IFunction functionClient, IObjectSerializationService objectSerializationService, AutoCreateOption autoCreateOption) : base(functionClient, objectSerializationService, autoCreateOption)
 {
 }
 public HttpDataTransferTestController(IObjectSerializationService ObjectSerializationHelper)
 {
     this.ObjectSerializationHelper = ObjectSerializationHelper;
 }