Exemple #1
0
        public string DehydrateValue(object obj, IGraph uow)
        {
            Condition.Requires(obj).IsNotNull();
            var data = this.DehydrateStrategy((T)obj);

            return(LengthEncoder.LengthEncode(data));
        }
        public string DehydrateValue(object obj, IGraph uow)
        {
            Condition.Requires(obj).IsNotNull();
            var data = ((DateTime)obj).ToString();

            return(LengthEncoder.LengthEncode(data));
        }
        public string DehydrateValue(object obj, IGraph uow)
        {
            //we can handle this if it's  a duplicate reference of something already in the node store
            var matches = uow.NodeStore.SearchOf <GraphNode>(LogicOfTo <GraphNode, bool> .New((x) =>
            {
                if (x.NodeValue == null)
                {
                    return(false);
                }

                return(object.ReferenceEquals(x.NodeValue, obj));
            }));

            return(LengthEncoder.LengthEncode(matches[0].Id));
        }
 public string DehydrateValue(object obj, IGraph uow)
 {
     //we return the full type of the compound type
     return(LengthEncoder.LengthEncode(obj.GetType().AssemblyQualifiedName));
 }