public object UnstageValue(StageItem item, Type targetType) { StageElement[] array = ((StageList)item).Elements().ToArray <StageElement>(); Type[] genericArguments = targetType.GetGenericArguments(); Type type = genericArguments[0]; Type type1 = genericArguments[1]; IDictionary dictionaries = Activator.CreateInstance(targetType, new object[] { (int)array.Length }) as IDictionary; for (int i = 0; i < (int)array.Length; i++) { StageElement stageElement = array[i]; object obj = SerializationMaster.Unstage(stageElement.Item("key"), type); object obj1 = SerializationMaster.Unstage(stageElement.Item("value"), type1); dictionaries.Add(obj, obj1); } return(dictionaries); }