What to do about Hashtables in client

Options
FlipFlop
edited September 2013 in DotNet
Hi

I'm upgrading to server v3.2 from 3.0.. It was simple enough on the server side.

The client however now has a million ambiguous references to Hashtable

I tried just using photon hashtable everywhere but some of the code uses functionality that isn't supported by photon Hashtable (constructing a hashtable based on another hashtable in this case).

Is it just a way to attempt to make things smoother while transitioning to Dictionaries ?

Are standard Hashtables no longer serializable ?

Are Dictionaries now serializable, since the photon Hashtable is basically a Dictionary ?

So basically i guess the Hashtables that need to get transmitted over the network needs to use the photon Hashtable and the rest can keep using the System.Hashtable. It's just a huge pain to sort through..

Comments

  • Tobias
    Options
    Generic Dictionaries are now supported.
    We had to switch to our own Hashtable class due to limited support across platforms like Win 8 Store, etc. There was no sane way to support both. I'm sorry this is causing issues (and I'm not happy with it either).

    I think the release history txt file has some description how to use the new Hashtable and get rid of the ambiguous references.
    If you let me know what you're missing in terms of functionality, we can add this to our Hashtable.

    We might completely drop the Hashtable but that's not yet decided and not yet being worked on.
  • I've mostly sorted it out now ..

    I ran into some trouble with a JSON encoder that took object but expected that object to be amongst other things Hashtable..

    Luckily I had the source so I just changed it to support IDictionary instead of Hashtable.

    I just wonder what other potential problems could lurk in the corners ..

    I once had started using Dictionary<object, object> instead of hashtables but it failed when trying to send nested Dictionaries within Dictionaries. This should now be officially supported ?
  • Tobias
    Options
    You shouldn't use dictionaries as keys but otherwise it should work now, yes.