示例#1
0
        internal static async Task <AssemblyMetadata> Load(IPersister persister, string target)
        {
            persister.Access(target);
            IAssemblyMetadata result = await persister.Load();

            return(new AssemblyMetadata(result));
        }
示例#2
0
        public SettingsRepository(IEventBus eventBus, IPersister persister, ILogger <SettingsRepository> logger)
        {
            _persister = persister;
            _logger    = logger;
            _eventBus  = eventBus;

            _settings = _persister.Load <Settings>(FILENAME) ?? CreateDefaultSettings();
        }
        public LiveProvider(IPersister <LiveToken> persister)
        {
            persister.NotNull("persister");
            _persister = persister;

            var token = _persister.Load();

            if (token != null)
            {
                _refreshTokenInfo = new RefreshTokenInfo(token.Value);
            }
        }
示例#4
0
        public DropboxProvider(IPersister <DropboxToken> persiter)
        {
            persiter.NotNull("persister");
            _persister = persiter;

            var token = _persister.Load();

            if (token != null)
            {
                _finalLogin = token.Value;
            }
        }
示例#5
0
        private void Initialize()
        {
            Retrospectives = _persister.Load();
            var lastRetrospective = Retrospectives.FirstOrDefault();

            if (lastRetrospective == null)
            {
                _currentLevel = new CcdLevel(Level.Black);
            }
            else
            {
                _currentLevel = lastRetrospective.Clone();
            }
        }
示例#6
0
        public void LoadPeople(IPersister persister)
        {
            var npcs = persister.Load <ObservableCollection <Person> >();

            People = npcs;
        }
示例#7
0
 public bool Load()
 {
     return(_persister.Load());
 }