示例#1
0
 /// <summary>
 /// Return info about the EntityItem serialize
 /// </summary>
 /// <param name="serializer">Serializer instance</param>
 /// <param name="item">EntityItem to discovery info</param>
 /// <returns>Return info about the EntityItem serialize</returns>
 public (Type Type, string ContainerName) GetSerializeInfo(ComplexEntityExpressionSerializer serializer, EntityItem <object> item)
 {
     return(
         item.Entity?.GetType(),
         null
         );
 }
示例#2
0
        /// <summary>
        /// Return info about the EntityItem serialize
        /// </summary>
        /// <param name="serializer">Serializer instance</param>
        /// <param name="item">EntityItem to discovery info</param>
        /// <returns>Return info about the EntityItem serialize</returns>
        public (Type Type, string ContainerName) GetSerializeInfo(ComplexEntityExpressionSerializer serializer, EntityItem <object> item)
        {
            var cast = (PropertyEntity)item;

            return(
                cast.Property.PropertyType,
                cast.Property.Name
                );
        }
示例#3
0
        /// <summary>
        /// Return info about the EntityItem serialize
        /// </summary>
        /// <param name="serializer">Serializer instance</param>
        /// <param name="item">EntityItem to discovery info</param>
        /// <returns>Return info about the EntityItem serialize</returns>
        public (Type Type, string ContainerName) GetSerializeInfo(ComplexEntityExpressionSerializer serializer, EntityItem <object> item)
        {
            var cast = (CollectionItemEntity)item;

            return(
                item.Entity?.GetType(),
                $"[{cast.Key.ToString()}]"
                );
        }
示例#4
0
        /// <summary>
        /// Return info about the EntityItem serialize
        /// </summary>
        /// <param name="serializer">Serializer instance</param>
        /// <param name="item">EntityItem to discovery info</param>
        /// <returns>Return info about the EntityItem serialize</returns>
        public (Type Type, string ContainerName) GetSerializeInfo(ComplexEntityExpressionSerializer serializer, EntityItem <object> item)
        {
            var cast = (DynamicItemEntity)item;

            return(
                item.Entity?.GetType(),
                cast.Property
                );
        }
示例#5
0
        /// <summary>
        /// Return info about the EntityItem serialize
        /// </summary>
        /// <param name="serializer">Serializer instance</param>
        /// <param name="item">EntityItem to discovery info</param>
        /// <returns>Return info about the EntityItem serialize</returns>
        public (Type Type, string ContainerName) GetSerializeInfo(ComplexEntityExpressionSerializer serializer, EntityItem <object> item)
        {
            var cast = (ArrayItemEntity)item;

            return(
                item.Entity?.GetType(),
                $"[{string.Join(",", cast.Indexes)}]"
                );
        }
示例#6
0
 /// <summary>
 /// Verify if EntityItem can be serialize
 /// </summary>
 /// <param name="serializer">Serializer instance</param>
 /// <param name="item">EntityItem to check</param>
 /// <returns>Return TRUE if can serialize</returns>
 public bool CanSerialize(ComplexEntityExpressionSerializer serializer, EntityItem <object> item)
 {
     return(true);
 }
示例#7
0
 /// <summary>
 /// Verify if EntityItem can be serialize
 /// </summary>
 /// <param name="serializer">Serializer instance</param>
 /// <param name="item">EntityItem to check</param>
 /// <returns>Return TRUE if can serialize</returns>
 public bool CanSerialize(ComplexEntityExpressionSerializer serializer, EntityItem <object> item)
 {
     return(item is PropertyEntity);
 }
示例#8
0
 /// <summary>
 /// Verify if EntityItem can be serialize
 /// </summary>
 /// <param name="serializer">Serializer instance</param>
 /// <param name="item">EntityItem to check</param>
 /// <returns>Return TRUE if can serialize</returns>
 public bool CanSerialize(ComplexEntityExpressionSerializer serializer, EntityItem <object> item)
 {
     return(item is CollectionItemEntity);
 }