Browse Source

Added some documentation to the Columns.Default function

Kenric Nugteren 1 year ago
parent
commit
3eb1199d20
1 changed files with 17 additions and 5 deletions
  1. 17 5
      InABox.Core/Column.cs

+ 17 - 5
InABox.Core/Column.cs

@@ -119,23 +119,35 @@ namespace InABox.Core
         IColumns Add(IColumn column);
         IColumns Add<T>(Expression<Func<T, object?>> column);
         IColumns DefaultColumns(params ColumnType[] types);
-        
-        void SerializeBinary(CoreBinaryWriter writer);
-        void DeserializeBinary(CoreBinaryReader reader);
     }
 
     public enum ColumnType
     {
         ExcludeVisible,
+        /// <summary>
+        /// Do not include <see cref="Entity.ID"/> in the columns.
+        /// </summary>
         ExcludeID,
         IncludeOptional,
         IncludeForeignKeys,
+        /// <summary>
+        /// Include all columns that are accessible through entity links present in the root class.
+        /// </summary>
         IncludeLinked,
         IncludeAggregates,
         IncludeFormulae,
+        /// <summary>
+        /// Include any columns that are a <see cref="CustomProperty"/>.
+        /// </summary>
         IncludeUserProperties,
+        /// <summary>
+        /// Include all columns that are accessible through entity links, even nested ones.
+        /// </summary>
         IncludeNestedLinks,
         IncludeEditable,
+        /// <summary>
+        /// Add all columns found.
+        /// </summary>
         All
     }
 
@@ -371,7 +383,7 @@ namespace InABox.Core
             if (typeof(T).IsSubclassOf(typeof(Entity)) && !types.Contains(ColumnType.ExcludeID))
                 columns.Add(new Column<T>("ID"));
             
-            for  (int iCol=0; iCol<props.Count; iCol++)
+            for  (int iCol = 0; iCol < props.Count; iCol++)
             {
                 var prop = props[iCol];
                 var bOK = true;
@@ -464,7 +476,7 @@ namespace InABox.Core
 
                 if (bOK && !columns.Any(x => string.Equals(x.Property?.ToUpper(), prop.Name?.ToUpper())))
                 {
-                    if (bOK && prop.Editor is LookupEditor le)
+                    if (prop.Editor is LookupEditor le)
                     {
                         if (le.OtherColumns != null)
                         {