OSDN Git Service

CoreDataConfigurationをstaticに持たないようにした
authormasakih <masakih@users.sourceforge.jp>
Fri, 13 Oct 2017 13:38:09 +0000 (22:38 +0900)
committermasakih <masakih@users.sourceforge.jp>
Fri, 13 Oct 2017 13:38:09 +0000 (22:38 +0900)
KCD/BookmarkDataStore.swift
KCD/LocalDataStore.swift
KCD/ResourceHistoryDataStore.swift
KCD/ServerDataStore.swift
KCD/TemporaryDataStore.swift

index 3459f3e..66bf350 100644 (file)
@@ -8,14 +8,9 @@
 
 import Cocoa
 
-extension CoreDataConfiguration {
-    
-    static let bookmark = CoreDataConfiguration("Bookmark")
-}
-
 final class BookmarkDataStore: CoreDataManager {
     
-    static let core = CoreDataCore(.bookmark)
+    static let core = CoreDataCore(CoreDataConfiguration("Bookmark"))
     
     static let `default` = BookmarkDataStore(type: .reader)
     
index 21d2151..2708e51 100644 (file)
@@ -8,14 +8,9 @@
 
 import Cocoa
 
-extension CoreDataConfiguration {
-    
-    static let local = CoreDataConfiguration("LocalData")
-}
-
 final class LocalDataStore: CoreDataManager {
     
-    static let core = CoreDataCore(.local)
+    static let core = CoreDataCore(CoreDataConfiguration("LocalData"))
     
     static let `default` = LocalDataStore(type: .reader)
     
index d05978e..1f415c5 100644 (file)
@@ -8,14 +8,9 @@
 
 import Cocoa
 
-extension CoreDataConfiguration {
-    
-    static let resourceHistory = CoreDataConfiguration("ResourceHistory")
-}
-
 final class ResourceHistoryDataStore: CoreDataManager {
     
-    static let core = CoreDataCore(.resourceHistory)
+    static let core = CoreDataCore(CoreDataConfiguration("ResourceHistory"))
     
     static let `default` = ResourceHistoryDataStore(type: .reader)
     
index 8010660..7d80b32 100644 (file)
@@ -8,14 +8,9 @@
 
 import Cocoa
 
-extension CoreDataConfiguration {
-    
-    static let kcd = CoreDataConfiguration("KCD", tryRemake: true)
-}
-
 final class ServerDataStore: CoreDataManager {
     
-    static let core = CoreDataCore(.kcd)
+    static let core = CoreDataCore(CoreDataConfiguration("KCD", tryRemake: true))
     
     static let `default` = ServerDataStore(type: .reader)
     
index 3dd18d4..db2fe65 100644 (file)
@@ -8,18 +8,12 @@
 
 import Cocoa
 
-extension CoreDataConfiguration {
-    
-    static let temporary = CoreDataConfiguration("Temporary",
-                                                 fileName: ":memory:",
-                                                 options: [:],
-                                                 type: NSInMemoryStoreType
-    )
-}
-
 final class TemporaryDataStore: CoreDataManager {
     
-    static let core = CoreDataCore(.temporary)
+    static let core = CoreDataCore(CoreDataConfiguration("Temporary",
+                                                         fileName: ":memory:",
+                                                         options: [:],
+                                                         type: NSInMemoryStoreType))
     
     static let `default` = TemporaryDataStore(type: .reader)