コード例 #1
0
        /// <summary>
        ///     Returns a list of the name of the fields that are assigned the specified <paramref name="modelName" /> on the
        ///     particiular <paramref name="source" />.
        /// </summary>
        /// <param name="source">The object class.</param>
        /// <param name="modelName">The field model name.</param>
        /// <returns>
        ///     Returns a <see cref="IEnumerable{T}" /> representing the name of the fields that are assigned the field model name.
        /// </returns>
        /// <exception cref="ArgumentNullException">modelName</exception>
        public static IEnumerable <string> GetFieldNames(this ITable source, string modelName)
        {
            if (source == null)
            {
                return(null);
            }
            IObjectClass table = source as IObjectClass;

            if (table == null)
            {
                return(null);
            }

            return(table.GetFieldNames(modelName));
        }
コード例 #2
0
ファイル: ClassAsyncExtensions.cs プロジェクト: wey12138/Wave
 /// <summary>
 ///     Returns a list of the name of the fields that are assigned the specified <paramref name="modelNames" /> on the
 ///     particiular <paramref name="source" />.
 /// </summary>
 /// <param name="source">The object class.</param>
 /// <param name="modelNames">The model names.</param>
 /// <returns>
 ///     Returns a <see cref="IEnumerable{T}" /> representing the name of the fields that are assigned the field model name.
 /// </returns>
 /// <exception cref="ArgumentNullException">modelNames</exception>
 public static IEnumerable <string> GetFieldNamesAsync(this IObjectClass source, params string[] modelNames)
 {
     return(Task.Wait(() => source.GetFieldNames(modelNames)));
 }