Dotnet Core implementation?
@brendandburns burns Would love to see a dotnet core implementation or even get some thoughts around how you see the interfaces of shaping up for it.
I'd love to see this happen, but I think it's tricky. In the javascript case we intercept a bunch of read/writes automagically and persist the data to a central store. I'm not sure what the right way to do this is in C#.
The simplest thing would be to provide a Dictionary and just persist that, but I feel like it doesn't quite mesh with the goals of the storage library which is to make such things "automatic" but if that's the best we can do, I suppose a Dictionary isn't a terrible starting place...
@brendandburns could we use an expando object? this can give us a similar usability to js implementation?
using System;
using System.Dynamic;
namespace storage
{
class Program
{
static void Main(string[] args)
{
dynamic dynamicVars = new ExpandoObject();
try
{
Console.WriteLine($"before update of someVar: {dynamicVars.someVar}");
}
catch
{
Console.WriteLine("Looks like the someVar doesnt exist.");
}
dynamicVars.someVar = "Hello World";
Console.WriteLine($"after update of someVar: {dynamicVars.someVar}");
}
}
}
@brendandburns - thought i will give the dotnet version a stab. WIP https://github.com/srini85/storage/tree/initial-dotnet-version