nunomaia / NwRfcNet

An easy way of making SAP RFC calls from .NET Core
Apache License 2.0
96 stars 28 forks source link

Better RFC connection initialization #45

Closed mhudasch closed 4 years ago

mhudasch commented 4 years ago

Hi, first a big thanks for building this because I could use this to get a quick running prototype to communicate with the sap application server.

In my fork I firstly corrected some of the typos in the summary comments. After that I saw the issue #42 and agreed that this was missing.

I implemented in this request the possibility to use both a fluent api to initialize a connection but also be open with a dictionary to plug into apis like the microsoft configuration apis (what I use mostly). Lastly a colleague mentioned to me there is a uri style connection parameter collection that bizz-talk apis use to connect to spa and that could be plugged in as well. And just for completeness (At what I think :D) I added a database-like connection string into the mix as well.

During the implementation for the above things I ran into issues that the current api lacks the possibility to add new connection parameters generically and this would be possible as well now.

nunomaia commented 4 years ago

Many thanks for this pull request. This was my initial goal with issue #1, but I didn't have enough time to refactor it. Using a connecting string it is possible to store connection in Azure Vault or similar service to help to secure passwords or other sensitive information. Before merging this request, can you add a new sample with a connection string?

mhudasch commented 4 years ago

Looking at the code again to implement the sample you asked for I also build some unit-tests for the constructors of the RfcConnection class. And on the way I discovered some bugs in the connection uri one so thanks again 👍