/// <summary> /// Gets a dictionary of the fields that are assigned the <paramref name="modelNames" /> organized by the model name /// followed by the field indexes. /// specified <paramref name="source" />. /// </summary> /// <param name="source">The object class</param> /// <param name="modelNames">The model names.</param> /// <returns> /// Returns the <see cref="Dictionary{TKey,TValue}" /> representing the field model name for the field indexes. /// </returns> public static Dictionary <string, List <int> > GetFieldIndexes(this ITable source, params string[] modelNames) { if (source == null) { return(null); } IObjectClass table = source as IObjectClass; if (table == null) { return(null); } return(table.GetFieldIndexes(modelNames)); }
/// <summary> /// Gets a dictionary of the fields that are assigned the <paramref name="modelNames" /> organized by the model name /// followed by the field indexes. /// specified <paramref name="source" />. /// </summary> /// <param name="source">The object class</param> /// <param name="modelNames">The model names.</param> /// <returns> /// Returns the <see cref="Dictionary{Key, Value}" /> representing the field model name for the field indexes. /// </returns> /// <exception cref="ArgumentNullException">modelNames</exception> public static Dictionary <string, List <int> > GetFieldIndexesAsync(this IObjectClass source, params string[] modelNames) { return(Task.Wait(() => source.GetFieldIndexes(modelNames))); }