/// <summary> /// Gets the properties of the class based on the target command. /// </summary> /// <typeparam name="TEntity">The target type.</typeparam> /// <param name="command">The target command.</param> /// <returns>The properties of the class based on the target command.</returns> public static IEnumerable <ClassProperty> GetProperties <TEntity>(Command command) where TEntity : class { switch (command) { case Command.BatchQuery: return(ClassPropertiesExtractorForBatchQuery <TEntity> .Extract()); case Command.BulkInsert: return(ClassPropertiesExtractorForBulkInsert <TEntity> .Extract()); case Command.Count: return(ClassPropertiesExtractorForCount <TEntity> .Extract()); case Command.Delete: return(ClassPropertiesExtractorForDelete <TEntity> .Extract()); case Command.DeleteAll: return(ClassPropertiesExtractorForDeleteAll <TEntity> .Extract()); case Command.InlineInsert: return(ClassPropertiesExtractorForInlineInsert <TEntity> .Extract()); case Command.InlineMerge: return(ClassPropertiesExtractorForInlineMerge <TEntity> .Extract()); case Command.InlineUpdate: return(ClassPropertiesExtractorForInlineUpdate <TEntity> .Extract()); case Command.Insert: return(ClassPropertiesExtractorForInsert <TEntity> .Extract()); case Command.Merge: return(ClassPropertiesExtractorForMerge <TEntity> .Extract()); case Command.Query: return(ClassPropertiesExtractorForQuery <TEntity> .Extract()); case Command.Truncate: return(ClassPropertiesExtractorForTruncate <TEntity> .Extract()); case Command.Update: return(ClassPropertiesExtractorForUpdate <TEntity> .Extract()); default: return(ClassPropertiesExtractor <TEntity> .Extract()); } }
/// <summary> /// Gets the properties of the class. /// </summary> /// <typeparam name="TEntity">The target type.</typeparam> /// <returns>The properties of the class.</returns> public static IEnumerable <ClassProperty> GetProperties <TEntity>() where TEntity : class { return(ClassPropertiesExtractor <TEntity> .Extract()); }