File_Adapter: refactoring-refactor to match ReplaceInMemory refactoring
@alelom is already working on this.
Since Jul 2, 2019.
Assessment
This issue has not been assessed yet.
Description
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.
- Dominant language
- C#
- Stars
- 0
- Forks
- 7
- Avg merge
- 5d 8h
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from BHoM/File_Toolkit
-
type:feature
Difficulty 4/5 3-5 days Newbie friendliness 45/100
BHoM/File_Toolkit#206 ·
-
JSON push always wrapped in array structureMay be free again @michaelhoehn claimed this 816 days ago, and no pull request is open. Opentype:feature
BHoM/File_Toolkit#193 · 1 assignee ·
-
type:bug type:feature
Difficulty 4/5 3-5 days Newbie friendliness 38/100
BHoM/File_Toolkit#191 ·
-
Create Unit Tests to automate regression testingMay be free again @alelom claimed this 910 days ago, and no pull request is open. Opentype:test-script
BHoM/File_Toolkit#189 · 1 assignee ·
-
Enable writing to JSON without including BHoM-specific attributesMay be free again @alelom claimed this 1611 days ago, and no pull request is open. Opentype:feature
BHoM/File_Toolkit#133 · 1 comment · 1 assignee ·
All issues in BHoM/File_Toolkit
Similar issues
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
spectreconsole/spectre.console#2221 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
area/navigationview 🧭 difficulty/starter 🚀 good first issue kind/bug platform/all project/navigation-lifecycle 🧬 triage/untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
unoplatform/uno#24925 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
PhilippC/keepass2android#3315 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
DamianEdwards/ghcp-spend-tray#39 ·
Maintainers usually reply within 1 day