Ejemplo n.º 1
0
        public static T GetValue <T>(this SerializationInfo info, string Name)
        {
            if (IndirectTypes.Contains(typeof(T)))
            {
                return((T)GetIndirectValue <T>(info, Name));
            }

            return((T)info.GetValue(Name, typeof(T)));
        }
Ejemplo n.º 2
0
        public static T Deserialize <T>(this BinaryFormatter Formatter, Stream Stream)
        {
            if (IndirectTypes.Contains(typeof(T)))
            {
                return((T)GetIndirectValue <T>(Formatter, Stream));
            }

            return((T)Formatter.Deserialize(Stream));
        }