Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

File_Adapter: refactoring-refactor to match ReplaceInMemory refactoring

Offen
#149 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@alelom arbeitet bereits daran.

Seit 02.7.2019.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

type:compliance
Description

As explained in https://github.com/BHoM/BHoM_Adapter/issues/106

Since File_Adapter does not set AdapterConfig.ProcessInMemory, that defaults to true.
This means that the call to Create will always have replaceAll set to true.

Therefore the following calls will have replaceAll always set to true:
https://github.com/BHoM/BHoM_Adapter/blob/49d63e82db3eefa5eecb960e1bd84ab410fc2c51/File_Adapter/CRUD/Create.cs#L40-L46

So these lines never get called
https://github.com/BHoM/BHoM_Adapter/blob/49d63e82db3eefa5eecb960e1bd84ab410fc2c51/File_Adapter/CRUD/Create.cs#L80-L81
As well as this is never called with Append:
https://github.com/BHoM/BHoM_Adapter/blob/49d63e82db3eefa5eecb960e1bd84ab410fc2c51/File_Adapter/CRUD/Create.cs#L57

Proposed change

If anything, the option for the Create method to override should be specifiable dynamically, rather than hard-coded.
This might be solved by making the so called config parameter available to all CRUD methods.

I would remove replaceAll as a parameter of the Create() and use another parameter like
config["CreateOverride"] = true.

Vorherrschende Sprache
C#
Sterne
0
Forks
7
Ø Merge
5 T. 8 Std.
Gemergte PRs (30 T.)
2

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus BHoM/File_Toolkit

Alle Issues in BHoM/File_Toolkit

Ähnliche Issues

Weitere Issues zu C#

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.