public UnitOfWorkBase(ILocalData <string, IUnitOfWork> localData, string factorykey, IsolationLevel isolationLevel = IsolationLevel.Unspecified) { successHandlers = new List <Action>(); this.localData = localData; this.IsInTransaction = false; this.FactoryKey = factorykey; }
public DashboardViewModel() { _nav = AppContainer.Instance.GetInstance <INavigationService>(); _data = new DataService(); ButtonCommand = new Command <string>(DoButtonCommand); }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel(ILocalData dataBase) { LocalDataGenerator.CreateInitialDb(true); this.dataBase = dataBase; this.dataBase.Initialize(); this.mangaGroups = new ObservableCollection<MangaGroupViewModel>(); LoadMangaList(); }
public UnitOfWorkFactory(ISessionFactory sessionFactory, ILocalData localData) { if (sessionFactory == null) throw new ArgumentNullException("sessionFactory"); if (localData == null) throw new ArgumentNullException("localData"); _currentUnitOfWorkKey = "CurrentUnitOfWork.Key\\" + Guid.NewGuid().ToString("N"); _sessionFactory = sessionFactory; _localData = localData; }
public MySettingsViewModel() { _db = DependencyService.Get <ILocalData>(); var user = _db.GetUserInfo(); if (user != null) { id = user.Id; lastName = user.LastName; firstName = user.FirstName; email = user.Email; phone = user.Phone; mobile = user.Mobile; receiveEmail = user.ReceiveEmail; receiveNotification = user.ReceiveNotification; token = user.Token; serverEndPoint = user.ServerEndPoint; } this.SaveCommand = new Command(() => { if (SaveUser() > 0) { ReturnMessage = "Saved"; } }); this.CancelCommand = new Command(() => { LastName = null; FirstName = null; Email = null; Phone = null; Mobile = null; ReceiveEmail = false; ReceiveNotification = false; if (SaveUser() > 0) { ReturnMessage = "Canceled"; } }); }
public SessionStore(ILocalData localData) { this.localData = localData; }
public MangaDetailViewModel(IWebData service, ILocalData dataBase) { this.service = service; this.dataBase = dataBase; /* MOCKING! */ //Manga = new Manga() //{ // Title = "Awesome manga", // LocalSummaryImage = "ms-appx:/Assets/SOUL_EATER-Portada.jpg", // ArtistsDb = string.Join("#", new List<string>() { "Awesome author 1", "Awesome author 2", "Awesome author 1" }), // Description = "You think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out. Now, I don't know exactly when we turned on each other, but I know that seven of us survived the slide... and only five made it out. Now we took an oath, that I'm breaking now. We said we'd say it was the snow that killed the other two, but it wasn't. Nature is lethal but it doesn't hold a candle to man. /nYou think water moves fast? You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out. Now, I don't know exactly when we turned on each other, but I know that seven of us survived the slide... and only five made it out. Now we took an oath, that I'm breaking now. We said we'd say it was the snow that killed the other two, but it wasn't. Nature is lethal but it doesn't hold a candle to man.", // YearOfRelease = 9999, // LastChapter = 10, // StatusDb = 1, //}; //var chapters = new List<Chapter>(); //for (int i = 1; i <= 50; i++) // chapters.Add(new Chapter() { Title = "Chapter" + i, Number = i }); //this.dataBase.CreateInitialDb(); Manga = dataBase.MangaList.First(); service.GetMangaChapters(Manga); //LoadData(); }
public UnitOfWorkStore(ILocalData localData) { this.localData = localData; }
static UnitOfWorkFactory() { UnitOfWorkLocalData = LocalDataFactory <string, IUnitOfWork> .GetOrAdd(LOCAL_DATA_REGION); }
public static void Init(IWmsEnvironmentInfoProvider provider, ILocalData localData) { _provider = provider; _localData = localData; }
public UnitOfWork(ISession session, ILocalData <string, IUnitOfWork> localData, string factoryKey, IsolationLevel isolationLevel) : base(localData, factoryKey, isolationLevel) { this.Session = session; this.IsolationLevel = isolationLevel; }