public OrderImportor(IOrderManager orderManager, IStoreManager storeManager, IProductManager productManager, IShipmentManager shipmentManager, IProductAttributeFormatter productAttributeFormatter, IProductAttributeManager productAttributeManager, ILogisticsManager logisticsManager, ILogger logger, IPriceCalculator priceCalculator, IStateManager stateManager, IAddressManager addressManager, IStateCache stateCache) { this._orderManager = orderManager; this._storeManager = storeManager; this._productManager = productManager; this._shipmentManager = shipmentManager; this._productAttributeFormatter = productAttributeFormatter; this._productAttributeManager = productAttributeManager; this._logisticsManager = logisticsManager; this._logger = logger; this._stateManager = stateManager; this._addressManager = addressManager; this._stateCache = stateCache; this._priceCalculator = priceCalculator; }
public bool AcknowledgePurchase(GxUserType gxStoreConfig, string productId, GxUserType gxPurchaseResult) { IStoreManager storeMgr = null; int errCode = GetManager(gxStoreConfig, 2, out storeMgr); GooglePlayStoreManager mgr = (GooglePlayStoreManager)storeMgr; PurchaseResult purchase = JSONHelper.Deserialize <PurchaseResult>(gxPurchaseResult.ToJSonString()); try { return(mgr.AcknowledgePurchase(productId, purchase)); } catch (StoreConfigurationException e) { errCode = 3; ErrDescription = e.Message; } catch (StoreInvalidPurchaseException e) { errCode = 2; ErrDescription = e.Message; } catch (StoreServerException e) { errCode = 4; ErrDescription = e.Message; } catch (StoreException e) { errCode = 10; ErrDescription = e.Message; } return(false); }
public OrderAppService(IOrderManager orderAppService, IProductManager productManager, IProductAttributeManager productAttributeManager, IStoreManager storeManager, ILocalizationManager localizationManager, IPictureManager pictureManager, IProductAttributeParser productAttributeParser, IStateManager stateManager, IProductAttributeFormatter productAttributeFormatter, IOrderExcelExporter orderExcelExporter, ICacheManager cacheManager, IAppNotifier appNotifier) { this._orderManager = orderAppService; this._storeManager = storeManager; this._localizationManager = localizationManager; this._cacheManager = cacheManager; this._pictureManager = pictureManager; this._productAttributeParser = productAttributeParser; this._stateManager = stateManager; this._productAttributeFormatter = productAttributeFormatter; this._productManager = productManager; this._productAttributeManager = productAttributeManager; this._orderExcelExporter = orderExcelExporter; this._appNotifier = appNotifier; }
public StoreAppService(IStoreManager storeManager, ICacheManager cacheManager, IPictureManager pictureManager) { this._storeManager = storeManager; this._cacheManager = cacheManager; this._pictureManager = pictureManager; }
public ScoreHub(IStoreManager storeManager, IGameManager gameManager) { _storeManager = storeManager; _gameManager = gameManager; _gameManager.GameScoreUpdated += GameManagerGameScoreUpdated; _storeManager.GamerUpdated += StoreManagerGamerUpdated; rng = new Random(); }
private Dictionary <TKey, object[]> Init() { _storeManager = (IStoreManager)Activator.CreateInstance(_options.StoreManagerType); _storeManager.Initialize(_options, _entityType, _keyValueFactory); Dictionary <TKey, object[]> newList = new Dictionary <TKey, object[]>(_keyValueFactory.EqualityComparer); return(ConvertFromProvider(_storeManager.Deserialize(newList))); }
public ServerCore(string baseLocation, ICache queryCache, PersistenceType persistenceType) { Logging.LogInfo("ServerCore Initialised {0}", baseLocation); _baseLocation = baseLocation; _stores = new Dictionary<string, StoreWorker>(); var configuration = new StoreConfiguration {PersistenceType = persistenceType}; _storeManager = StoreManagerFactory.GetStoreManager(configuration); _queryCache = queryCache; }
protected async override void OnResume() { storeManager = FreshIOC.Container.Resolve <IStoreManager>() as StoreManager; // Handle when your app resumes if (StoreManager.MobileService.CurrentUser != null) { await storeManager.SyncAllAsync(false); } }
/// <summary> /// Creates a new server core that uses a specific IStoreManager implementation /// rather than getting one from the StoreManagerFactory /// </summary> /// <param name="baseLocation"></param> /// <param name="storeName"></param> /// <param name="storeManager"></param> public StoreWorker(string baseLocation, string storeName, IStoreManager storeManager) { _storeName = storeName; _storeLocation = Path.Combine(baseLocation, storeName); Logging.LogInfo("StoreWorker created with location {0}", _storeLocation); _jobs = new ConcurrentQueue <Job>(); _jobExecutionStatus = new ConcurrentDictionary <string, JobExecutionStatus>(); _storeManager = storeManager; _transactionLog = _storeManager.GetTransactionLog(_storeLocation); }
public ProcessShipJob( IStoreManager storeManager, IShipmentManager shipmentManager, IShipmentTracker shipmentTracker, IOrderProcessingManager orderProcessingManager) { this._storeManager = storeManager; this._shipmentManager = shipmentManager; this._shipmentTracker = shipmentTracker; this._orderProcessingManager = orderProcessingManager; }
public OrderSyncSingleJob( IUnitOfWorkManager unitOfWorkManager, IStoreManager storeManager, ILogger logger, IOrderImportor orderImportor) { this._unitOfWorkManager = unitOfWorkManager; this._storeManager = storeManager; this._logger = logger; this._orderImportor = orderImportor; }
public ServerCore(string baseLocation, ICache queryCache, PersistenceType persistenceType, bool enableTransactionLoggingOnNewStores) { Logging.LogInfo("ServerCore Initialised {0}", baseLocation); _baseLocation = baseLocation; _stores = new Dictionary<string, StoreWorker>(); var configuration = StoreConfiguration.DefaultStoreConfiguration.Clone() as StoreConfiguration; configuration.PersistenceType = persistenceType; _storeManager = StoreManagerFactory.GetStoreManager(configuration); _queryCache = queryCache; _enableTransactionLogging = enableTransactionLoggingOnNewStores; }
public ACMGalleryController(RoleManager <IdentityRole> roleManager, UserManager <ApplicationUser> userManager, IStoreManager storeManager, IHostingEnvironment hostingEnvironment, IGalleryManager galleryManager ) { _roleManager = roleManager; _userManager = userManager; _storeManager = storeManager; _hostingEnvironment = hostingEnvironment; webRootPath = _hostingEnvironment.WebRootPath; _galleryManager = galleryManager; }
static App() { if (isMock) { StoreManager = new AuctionHouse.DataStore.Mock.Stores.StoreManager(); } else { StoreManager = new AuctionHouse.DataStore.Azure.StoreManager(); } }
public AccountApiController(UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, ILogger <AccountController> logger, RoleManager <IdentityRole> roleManager, JwtAuthentication JwtAuthentication, IStoreManager storeManager) { _userManager = userManager; _signInManager = signInManager; _logger = logger; _roleManager = roleManager; _JwtAuthentication = JwtAuthentication; _storeManager = storeManager; }
public SerializableTable( IEntityType entityType, bool sensitiveLoggingEnabled, IStoreManager storeManager) { _keyValueFactory = entityType.FindPrimaryKey().GetPrincipalKeyValueFactory <TKey>(); _sensitiveLoggingEnabled = sensitiveLoggingEnabled; _entityType = entityType; _storeManager = storeManager; _rows = Init(); }
public async Task InitializeStoreAsync() { if (storeManager == null) { storeManager = ServiceLocator.Instance.Resolve <IStoreManager>(); } if (!storeManager.IsInitialized) { await storeManager.InitializeAsync().ConfigureAwait(false); } }
public async Task InitializeStore() { if (storeManager == null) { storeManager = FreshIOC.Container.Resolve <IStoreManager>(); } if (!storeManager.IsInitialized) { await storeManager.InitializeAsync().ConfigureAwait(false); } }
public ServerCore(string baseLocation, ICache queryCache, PersistenceType persistenceType, bool enableTransactionLoggingOnNewStores) { Logging.LogInfo("ServerCore Initialised {0}", baseLocation); _baseLocation = baseLocation; _stores = new Dictionary <string, StoreWorker>(); var configuration = StoreConfiguration.DefaultStoreConfiguration.Clone() as StoreConfiguration; configuration.PersistenceType = persistenceType; _storeManager = StoreManagerFactory.GetStoreManager(configuration); _queryCache = queryCache; _enableTransactionLogging = enableTransactionLoggingOnNewStores; }
public SaveStoreViewModel(IStoreManager storeManager, IStoreCategoryManager categoryManager, ICountryManager countryManager, ICityManager cityManager, IAuthenticationService authService, IMvxMessenger messenger) : base(authService, messenger) { this.ShouldSubscribeToSessionChange = true; this._storeManager = storeManager; this._cityManager = cityManager; this._countryManager = countryManager; this._categoryManager = categoryManager; this.PropertyChanged += propertyChanged; this.MainImage = new ImageViewModel(); }
public ServerCore(string baseLocation, ICache queryCache, PersistenceType persistenceType) { Logging.LogInfo("ServerCore Initialised {0}", baseLocation); _baseLocation = baseLocation; _stores = new Dictionary <string, StoreWorker>(); var configuration = new StoreConfiguration { PersistenceType = persistenceType }; _storeManager = StoreManagerFactory.GetStoreManager(configuration); _queryCache = queryCache; }
public async Task InitializeStore() { if (storeManager == null) { storeManager = DependencyService.Get <IStoreManager>(); } if (!storeManager.IsInitialized) { await storeManager.InitializeAsync().ConfigureAwait(false); } }
public ManageStoreApiController(UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, ILogger <AccountController> logger, IUserManager manager, IHostingEnvironment env, RoleManager <IdentityRole> roleManager, JwtAuthentication JwtAuthentication, IStoreManager storeManager) { _userManager = userManager; _signInManager = signInManager; _logger = logger; _roleManager = roleManager; _JwtAuthentication = JwtAuthentication; _manager = manager; _storeManager = storeManager; _env = env; }
public FilterStoresViewModel(IStoreManager storeManager, IStoreCategoryManager categoryManager, ICountryManager countryManager, ICityManager cityManager, ITagManager tagManager) : base() { this._storeManager = storeManager; this._tagManager = tagManager; this._cityManager = cityManager; this._countryManager = countryManager; this._categoryManager = categoryManager; this.StoreFilter.PropertyChanged += StoreFilter_PropertyChanged; }
public bool DeleteStore(string storeId) { try { IStoreManager storeManager = GetStoreManager(); storeManager.DeleteStore(storeId); return(true); } catch (Exception ex) { Trace.TraceError("StoreWorkerService.DeleteStore failed with exception: {0}", ex); return(false); } }
public ViewModelBase(INavigationService navigationService, IEventAggregator eventAggregator, IStoreManager storeManager, IToast toast, IFavoriteService favoriteService, ILoggerFacade logger, ILaunchTwitter twitter, ISSOClient ssoClient, IPushNotifications pushNotifications, IReminderService reminderService, IPageDialogService pageDialogService) { Navigation = navigationService; EventAggregator = eventAggregator; StoreManager = storeManager; Toast = toast; FavoriteService = favoriteService; Logger = logger; SSOClient = ssoClient; PushNotifications = pushNotifications; ReminderService = reminderService; PageDialogService = pageDialogService; LaunchTwitter = twitter; }
/// <summary> /// Create a new B* store. /// </summary> /// <param name="storeId">The new store ID</param> /// <returns>True if the store was created successfully, false otherwise</returns> public bool CreateStore(string storeId) { try { IStoreManager storeManager = GetStoreManager(); storeManager.CreateStore(storeId, false).Close(); return(true); } catch (Exception ex) { Trace.TraceError(String.Format("StoreWorkerService.CreateStore failed with exception: {0}", ex)); throw; } }
public async Task InitializeStore() { if (storeManager == null) { storeManager = DependencyService.Get <IStoreManager>(); } if (localStore == null) { localStore = StoreManager.MobileService.SyncContext.Store; } if (!storeManager.IsInitialized) { await storeManager.InitializeAsync().ConfigureAwait(false); } }
public EntriesService(ILogger <EntriesService> logger, IStoreManager storeManager, IOverallStoreManager overallStoreManager, IMap <DateTimeInterval, TimeInterval> mapDateTimeIntervalToTimeInterval, IMap <IEnumerable <TopItem>, IEnumerable <EntryTimeLine> > mapTopItemsToEntryTimeLines, IMap <IEnumerable <TopItemWithPartitionKey>, IEnumerable <OverallEntry> > mapTopItemsWithPartitionKeyToOverallEntries, IMapAggregateTwoEntries <IEnumerable <TopItemWithPartitionKey>, IEnumerable <TopItemWithPartitionKey>, IEnumerable <OverallEntryEvolution> > mapTopItemsWithPartitionKeyToOverallEntriesEvolution, IMapAggregateTwoEntries <IEnumerable <TopItem>, IEnumerable <TopItem>, IEnumerable <DayEntryEvolution> > mapTopItemsToDayEntriesEvolution) { this.logger = logger; this.storeManager = storeManager; this.overallStoreManager = overallStoreManager; this.mapDateTimeIntervalToTimeInterval = mapDateTimeIntervalToTimeInterval; this.mapTopItemsToEntryTimeLines = mapTopItemsToEntryTimeLines; this.mapTopItemsWithPartitionKeyToOverallEntries = mapTopItemsWithPartitionKeyToOverallEntries; this.mapTopItemsWithPartitionKeyToOverallEntriesEvolution = mapTopItemsWithPartitionKeyToOverallEntriesEvolution; this.mapTopItemsToDayEntriesEvolution = mapTopItemsToDayEntriesEvolution; }
/// <summary> /// Execute a SPARQL query against a B* store /// </summary> /// <param name="storeId">The ID of the store to be queried</param> /// <param name="query">The SPARQL query to be executed.</param> /// <returns>The SPARQL query result</returns> public string ExecuteQuery(string storeId, string query) { try { IStoreManager storeManager = GetStoreManager(); var store = storeManager.OpenStore(storeId, true); var start = DateTime.UtcNow; long rowCount; var ret = store.ExecuteSparqlQuery(query, out rowCount); var end = DateTime.UtcNow; var queryLogEntity = new QueryLogEntity(storeId, query, rowCount, end.Subtract(start).TotalSeconds); var logTask = new Task(LogQuery, queryLogEntity); logTask.Start(); return(ret); } catch (Exception ex) { Trace.TraceError(String.Format("StoreWorkerService.ExecuteQuery failed with exception: {0}", ex)); throw; } }
public int GetManager(GxUserType gxStoreConfig, int platform, out IStoreManager mgr) { Init(); JObject storeConfig = (JObject)gxStoreConfig.GetJSONObject(); mgr = null; int errCode = 1; switch (platform) { case 2: string appleKey; if (GetConfigValue("appleKey", storeConfig, out appleKey)) { mgr = new AppleStoreStoreManager(appleKey); errCode = 0; } break; case 1: string sAccount, certPath, certPassword; if (GetConfigValue("googleServiceAccount", storeConfig, out sAccount) && GetConfigValue("googleCertificate", storeConfig, out certPath) && GetConfigValue("googleCertificatePassword", storeConfig, out certPassword)) { mgr = new GooglePlayStoreManager() { CertificatePassword = certPassword, CertificatePath = certPath, ServiceAccountEmail = sAccount }; errCode = 0; } break; default: throw new StoreInvalidPurchaseException("StoreManager Platform not implemented"); } ErrCode = errCode; return(errCode); }
//Init must be called each time to connect and reconnect to the OBD device public async Task Initialize(IStoreManager storeManager) { //Ensure that initialization is only performed once if (!isInitialized) { isInitialized = true; this.storeManager = storeManager; //Get platform specific implementation IOBDDevice obdDevice = ServiceLocator.Instance.Resolve<IOBDDevice>(); //Start listening for connectivity change event so that we know if connection is restablished\dropped when pushing data to the IOT Hub CrossConnectivity.Current.ConnectivityChanged += Current_ConnectivityChanged; //Provision the device with the IOT Hub var connectionStr = await DeviceProvisionHandler.GetHandler().ProvisionDevice(); iotHub.Initialize(connectionStr); //Check right away if there is any trip data left in the buffer that needs to be sent to the IOT Hub - run this thread in the background SendBufferedDataToIOTHub(); } }
private static void CalculateAndStoreTodayItems( ILogger <Program> logger, ServiceProvider serviceProvider, List <TopItem> todayTopItems, IStoreManager dailyStoreManager, IOverallStoreManager overallStoreManager) { logger.LogInformation("Calculating scores for today's items..."); CalculateDailyTopItems(logger, serviceProvider, todayTopItems); var todaysProcessedItems = overallStoreManager.AdvanceOverallItems(todayTopItems.FirstOrDefault().Date, todayTopItems.ToArray(), out int totalRecordsAffectedForTheDay); logger.LogInformation("Items processed: {0}", totalRecordsAffectedForTheDay); try { dailyStoreManager.UpdateItems(todaysProcessedItems); } catch (Exception e) { logger.LogError(e, "Cannot persist items in store."); throw; } }
//Init must be called each time to connect and reconnect to the OBD device public async Task Initialize(IStoreManager storeManager) { //Ensure that initialization is only performed once if (!isInitialized) { isInitialized = true; this.storeManager = storeManager; //Get platform specific implementation IOBDDevice obdDevice = ServiceLocator.Instance.Resolve <IOBDDevice>(); //Start listening for connectivity change event so that we know if connection is restablished\dropped when pushing data to the IOT Hub CrossConnectivity.Current.ConnectivityChanged += Current_ConnectivityChanged; //Provision the device with the IOT Hub var connectionStr = await DeviceProvisionHandler.GetHandler().ProvisionDevice(); iotHub.Initialize(connectionStr); //Check right away if there is any trip data left in the buffer that needs to be sent to the IOT Hub - run this thread in the background SendBufferedDataToIOTHub(); } }
public OrderManager(IRepository <Order, long> OrderRepository, IRepository <OrderItem, long> OrderItemRepository, IStoreManager storeManager, IProductManager productManager, IProductAttributeFormatter productAttributeFormatter, IProductAttributeManager productAttributeManager, ILogisticsManager logisticsManager, ILogger logger, IStateManager stateManager, IAddressManager addressManager, IStateCache stateCache) { this.OrderRepository = OrderRepository; this.OrderItemRepository = OrderItemRepository; this._storeManager = storeManager; this._productManager = productManager; this._productAttributeFormatter = productAttributeFormatter; this._productAttributeManager = productAttributeManager; this._logisticsManager = logisticsManager; this._logger = logger; this._stateManager = stateManager; this._addressManager = addressManager; this._stateCache = stateCache; }
public BrightstarQueryProcessorTests() { _storeManager = StoreManagerFactory.GetStoreManager(); _docTagStore = InitializeDocTagStore(); }
public FavoritesViewModel(IStoreManager storeManager, IProductManager productManager) :base() { this._productManager = productManager; this._storeManager = storeManager; }
public ManifestEvaluation() { _storeManager = StoreManagerFactory.GetStoreManager(); _testSuitePath = TestPaths.DataPath + "sparql-test-suite\\"; }
public void SetUp() { _storeManager = StoreManagerFactory.GetStoreManager(); }
public ManifestSyntax() { _storeManager = StoreManagerFactory.GetStoreManager(); }
public SparqlTest() { _storeManager = StoreManagerFactory.GetStoreManager(); }
/// <summary> /// Creates a new server core that uses a specific IStoreManager implementation /// rather than getting one from the StoreManagerFactory /// </summary> /// <param name="baseLocation"></param> /// <param name="storeName"></param> /// <param name="storeManager"></param> public StoreWorker(string baseLocation, string storeName, IStoreManager storeManager) { _storeName = storeName; _storeLocation = Path.Combine(baseLocation, storeName); Logging.LogInfo("StoreWorker created with location {0}", _storeLocation); _jobs = new ConcurrentQueue<Job>(); _jobExecutionStatus = new ConcurrentDictionary<string, JobExecutionStatus>(); _storeManager = storeManager; _transactionLog = _storeManager.GetTransactionLog(_storeLocation); }
public OptimiserTests() { _storeManager = StoreManagerFactory.GetStoreManager(); _docTagStore = InitializeDocTagStore(); }
public ManifestEvaluation(bool virtualizing) { Configuration.EnableVirtualizedQueries = virtualizing; _storeManager = StoreManagerFactory.GetStoreManager(); _testSuitePath = TestPaths.DataPath + "sparql-test-suite\\"; }
public ManifestEvaluation() { _storeManager = StoreManagerFactory.GetStoreManager(); }