Beispiel #1
0
 public ConfigService(IConfigFileStorage fileStorage, ITrwFactory trwFactory, ISerializationNecessities serializationNecessities)
 {
     this.fileStorage = fileStorage;
     this.serializationNecessities = serializationNecessities;
     this.trwFactory = trwFactory;
     configs         = new ConcurrentDictionary <Type, IConfig>();
 }
 public SaveLoadFactory(ISerializationNecessities serializationNecessities)
 {
     this.serializationNecessities = serializationNecessities;
 }
Beispiel #3
0
        public UndoRedoService(IWorldTreeService worldTreeService, IAssetService assetService, ISerializationNecessities serializationNecessities, ITrwDiffBuilder diffBuilder)
        {
            this.worldTreeService = worldTreeService;
            this.diffBuilder      = diffBuilder;
            var handlers      = serializationNecessities.GetTrwHandlerContainer(SaveLoadConstants.WorldSerializationType);
            var typeRedirects = serializationNecessities.GetTrwHandlerTypeRedirects(SaveLoadConstants.WorldSerializationType);

            diffApplier = new TrwSerializationDiffApplier(handlers, typeRedirects,
                                                          x => x.Add(SaveLoadConstants.AssetDictBagKey, new Dictionary <string, IAsset>()),
                                                          x => x.Add(SaveLoadConstants.AssetDictBagKey, assetService.Assets));
            diffIdentityComparer = new UndoRedoDiffIdentityComparer();
            undoStack            = new Stack <IUndoable>();
            redoStack            = new Stack <IUndoable>();
            guiObserver          = null;
        }