c# - List of various IReliableDictionaries -


using ireliabledictionary in service fabric application.

trying organise dictionaries in class, there way have list of ireliabledicionary use different keys?

ireliabledictionary<guid, user>   x = await getdictionaryasync<guid, user>("userdict"); ireliabledictionary<string, guid> y = await getdictionaryasync<string, guid>("emailtouser");  var dicts = new list<ireliabledictionary<object, object>> { x, y }; 

only doesn't work, because key of ireliabledictionary has implement icomparable , iequatable.

not had experience generics in c#. think of how in java, ? extends notation. possible in c#?

i'm not sure you're going this. you're not going compiler enforce type safety dictionaries in list. you'll have write reflection code. run problems trying maintain references dictionaries yourself.

the statemanager object manages dictionaries - that's it's for. thing should need keep track of names of dictionaries.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -