/// <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 ); }
/// <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 ); }
/// <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()}]" ); }
/// <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 ); }
/// <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)}]" ); }
/// <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); }
/// <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); }
/// <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); }