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);
        }
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddControllers();
            IResolver <IDataStore>      DataStoreResolver         = new XpoDataStoreResolver("appsettings.json");
            IStringSerializationService stringSerializationHelper = new StringSerializationHelper();
            IObjectSerializationService objectSerializationHelper = new CompressXmlObjectSerializationService();
            IFunction function = new DataStoreFunctionServer(DataStoreResolver, objectSerializationHelper);

            services.AddSingleton <IResolver <IDataStore> >(DataStoreResolver);
            services.AddSingleton <IStringSerializationService>(stringSerializationHelper);
            services.AddSingleton <IObjectSerializationService>(objectSerializationHelper);
            services.AddSingleton <IFunction>(function);
            //services.AddXpoWebApi();

            //TODO review this code, at the momentis needed to use the  await for the operations in the fucntion rest client
            //services.Configure<KestrelServerOptions>(options =>
            //{
            //    options.AllowSynchronousIO = true;
            //});
        }