Beispiel #1
0
        public CoreDataContext([NotNull] IPersistentContextProvider persistentContextProvider)
        {
            if (persistentContextProvider == null)
            {
                throw new ArgumentNullException(nameof(persistentContextProvider));
            }

            var context = persistentContextProvider.GetPersistentContext("core");

            var defaultObjectSet = context.GetOrCreateObjectSet("default-object-set");
        }
        public MainDataContext([NotNull] IPersistentContextProvider persistentContextProvider)
        {
            if (persistentContextProvider == null)
            {
                throw new ArgumentNullException(nameof(persistentContextProvider));
            }

            var context          = persistentContextProvider.GetPersistentContext("main");
            var defaultObjectSet = context.GetOrCreateObjectSet("default-object-set");

            MainWindow = defaultObjectSet.GetOrCreate <MainWindow>("main-window");
            News       = defaultObjectSet.GetOrCreate <News>("news");
        }
Beispiel #3
0
        public TriggersDataContext([NotNull] IPersistentContextProvider persistentContextProvider)
        {
            if (persistentContextProvider == null)
            {
                throw new ArgumentNullException(nameof(persistentContextProvider));
            }

            var context          = persistentContextProvider.GetPersistentContext("triggers");
            var defaultObjectSet = context.GetOrCreateObjectSet("default-object-set");

            ActionQueueTriggerConfig = defaultObjectSet.GetOrCreate <ActionQueueTriggerConfig>("action-queue-trigger-config");
            TriggersConfig           = defaultObjectSet.GetOrCreate <TriggersConfig>("triggers-config");
            CharacterTriggersConfigs = context.GetOrCreateObjectSet <CharacterTriggersConfig>("character-triggers-config");
        }