Exemplo n.º 1
0
        public object HydrateValue(string nodeText, IGraph uow)
        {
            var list = LengthEncoder.LengthDecodeList(nodeText);

            Condition.Requires(list).HasLength(2);
            var  typeName = list.ElementAt(0);
            var  serData  = list.ElementAt(1);
            Type type     = TheTypeLocator.Instance.Locator.FindAssemblyQualifiedType(typeName);
            var  obj      = BinarySerializationUtil.Deserialize(type, serData);

            return(obj);
        }
Exemplo n.º 2
0
        public object HydrateValue(string nodeText, IGraph uow)
        {
            var ser = new BinarySerializationUtil();
            string[] split = new string[] { GraphingDelimiters.DELIM_LEVEL1 };
            var arr = nodeText.Split(split, StringSplitOptions.None);
            Condition.Requires(arr).IsNotNull();
            Condition.Requires(arr).HasLength(2);
            var typeName = arr[0];
            var serData = arr[1];

            Type type = Util.FindAssemblyQualifiedType(typeName);
            var obj = ser.Deserialize(type, serData);
            return obj;
        }
Exemplo n.º 3
0
        public object HydrateValue(string nodeText, IGraph uow)
        {
            var ser = new BinarySerializationUtil();

            string[] split = new string[] { GraphingDelimiters.DELIM_LEVEL1 };
            var      arr   = nodeText.Split(split, StringSplitOptions.None);

            Condition.Requires(arr).IsNotNull();
            Condition.Requires(arr).HasLength(2);
            var typeName = arr[0];
            var serData  = arr[1];

            Type type = Util.FindAssemblyQualifiedType(typeName);
            var  obj  = ser.Deserialize(type, serData);

            return(obj);
        }