Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

File_Adapter: refactoring-refactor to match ReplaceInMemory refactoring

Aperta
#149 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@alelom ci sta già lavorando.

Dal 2/7/2019.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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.

Lingua principale
C#
Stelle
0
Fork
7
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di BHoM/File_Toolkit

Tutte le issue di BHoM/File_Toolkit

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.