Beispiel #1
0
        public void AddValue(string type, byte[] value)
        {
            Type t = Type.GetType(type);

            if (t != null)
            {
                data [type] = TransferDataSource.DeserializeValue(value);
            }
            else
            {
                data [type] = value;
            }
        }
Beispiel #2
0
        T ITransferData.GetValue <T> ()
        {
            object ob = GetValue(typeof(T).FullName);

            if (ob == null || ob.GetType() == typeof(Type))
            {
                return((T)ob);
            }
            if (ob is byte[])
            {
                T val = (T)TransferDataSource.DeserializeValue((byte[])ob);
                data[typeof(T).FullName] = val;
                return(val);
            }
            return((T)ob);
        }