Example #1
0
        public void Build(object obj)
        {
            A4ormObject returnValue = new A4ormObject();

            if (obj is IHasId)
            {
                IHasId iHasId = obj as IHasId;
                returnValue.Id = iHasId.Id;
            }
            else
            {
                //autogen id
                returnValue.Id = Guid.NewGuid().ToString();
            }

            //walk the object
            var meta = TypeMetaCache.Instance.GetTypeMeta(obj.GetType());

            meta.Properties.WithEach(propMeta =>
            {
                A4ormProperty prop = new A4ormProperty();
                prop.Type          = propMeta.Type;
            });
            var inspector = ObjectInspectorCache.Instance.GetInspector(obj.GetType());



            return(returnValue);
        }
Example #2
0
        public void Build(object obj)
        {
            A4ormObject returnValue = new A4ormObject();
            if (obj is IHasId)
            {
                IHasId iHasId = obj as IHasId;
                returnValue.Id = iHasId.Id;
            }
            else
            {
                //autogen id
                returnValue.Id = Guid.NewGuid().ToString();
            }

            //walk the object
            var meta = TypeMetaCache.Instance.GetTypeMeta(obj.GetType());

            meta.Properties.WithEach(propMeta =>
            {
                A4ormProperty prop = new A4ormProperty();
                prop.Type = propMeta.Type;

            });
            var inspector = ObjectInspectorCache.Instance.GetInspector(obj.GetType());
            


            return returnValue;
        }
Example #3
0
 private static void BuildProperty(A4ormObject context, object propertyValue, string currentPath)
 {
     //walk the object
 }
Example #4
0
        private static void BuildProperty(A4ormObject context, object propertyValue, string currentPath )
        {
            //walk the object


        }