public static Dictionary <XenRef <T>, T> Create <S>(object o) { if (o == null) { throw new ArgumentNullException("o"); } Hashtable hashtable = (Hashtable)o; Dictionary <XenRef <T>, T> dictionary = new Dictionary <XenRef <T>, T>(); foreach (object obj2 in hashtable.Keys) { XenRef <T> ref2 = new XenRef <T>((string)obj2); Hashtable table = (Hashtable)hashtable[obj2]; dictionary[ref2] = (T)Marshalling.convertStruct(typeof(T), table); } return(dictionary); }