public static void ProcessQuasarModTypes(ObservableCollection <InternalModType> V1InternalModTypes) { ObservableCollection <QuasarModType> QuasarModTypes = new ObservableCollection <QuasarModType>(); foreach (InternalModType imt in V1InternalModTypes) { QuasarModType qmt = new QuasarModType() { ID = imt.ID, Name = imt.Name, GameElementFamilyID = imt.Association, GroupName = imt.TypeGroup, IgnoreGameElementFamily = imt.IgnoreableGameDataAssociation, NoGameElement = imt.NoGameData, IsExternal = imt.OutsideFolder, ExternalFolderPath = imt.OutsideFolderPath, SlotCount = imt.Slots, QuasarModTypeFileDefinitions = new ObservableCollection <QuasarModTypeFileDefinition>() }; foreach (InternalModTypeFile bf in imt.Files) { QuasarModTypeFileDefinition fileDefinition = new QuasarModTypeFileDefinition() { ID = bf.ID, SearchPath = bf.SourcePath, SearchFileName = bf.SourceFile, QuasarModTypeBuilderDefinitions = new ObservableCollection <QuasarModTypeBuilderDefinition>() }; foreach (BuilderFile f in bf.Files) { fileDefinition.QuasarModTypeBuilderDefinitions.Add(new QuasarModTypeBuilderDefinition() { ModLoaderID = f.BuilderID, OutputFileName = f.File, OutputPath = f.Path }); } qmt.QuasarModTypeFileDefinitions.Add(fileDefinition); } QuasarModTypes.Add(qmt); } JSonHelper.SaveQuasarModTypes(QuasarModTypes); }