jamesmontemagno / SettingsPlugin

Read and Write Settings Plugin for Xamarin and Windows
MIT License
324 stars 80 forks source link

fileName parameter is ignored in dotnet version #128

Open ghost opened 6 years ago

ghost commented 6 years ago

Hi,

The functions AddOrUpdateValueInternal and GetValueOrDefaultInternal from the source file Settings.dotnet.cs are ignoring the fileName parameter. Is it on purpose ? Do you plan to handle it in the future ?

ncarandini commented 6 years ago

This is documented here: FileName Parameter for .NET 4.5: Does not apply

jamesmontemagno commented 6 years ago

I am open to implementations and ideas.

AndreiMisiukevich commented 6 years ago

@jamesmontemagno what about this idea As I see, now we are creating separate file for every key. So, we can create xml file for several keys. It will give as possibility to work with it in "dictionary mode". Something like this https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/linq/how-to-work-with-dictionaries-using-linq-to-xml

One file can have such structure

<Root>  
  <key1 type="int">21</key1>  
  <key2 type="string">message</key2>  
  <key3 type="bool">False</key3>  
</Root>  
AndreiMisiukevich commented 6 years ago

are there thoughts?