示例#1
0
 /// <summary>Gets the <see cref="Column"/> by specified <see cref="ColumnId"/>.</summary>
 /// <param name="columnId">The <see cref="ColumnId"/> which uniquely identifies the column.</param>
 /// <returns>Column with the specified <see cref="ColumnId"/>, <see langword="null"/> if no column found.</returns>
 public Column this[ColumnId columnId]
 {
     get
     {
         var result = this[columnId.Name];
         return(result != null && result.DeclaringType == columnId.DeclaringType ? result : null);
     }
 }
示例#2
0
 /// <summary>Gets the <see cref="Column"/> by specified <see cref="ColumnId"/>.</summary>
 /// <param name="columnKey">The <see cref="ColumnId"/> which uniquely identifies the column.</param>
 /// <returns>Column with the specified <see cref="ColumnId"/>, <see langword="null"/> if no column found.</returns>
 public Column this[ColumnId columnKey]
 {
     get
     {
         var columns = Columns;
         return(columns.Contains(columnKey) ? columns[columnKey] : null);
     }
 }
示例#3
0
 private static Column GetColumnByOriginalId(IReadOnlyDictionary <ColumnId, IColumns> columnsByOriginalId, ColumnId originalId)
 {
     if (columnsByOriginalId.TryGetValue(originalId, out var columns))
     {
         if (columns.Count == 1)
         {
             return(columns.Single());
         }
     }
     return(null);
 }