private void BuildColumns(Zetbox.App.Base.DataType cls, IEnumerable <Property> props, IEnumerable <Method> methods, Mode mode) { if (cls == null) { throw new ArgumentNullException("cls"); } if (props == null) { throw new ArgumentNullException("props"); } if (methods == null) { throw new ArgumentNullException("methods"); } ShowIcon = cls.ShowIconInLists; ShowId = cls.ShowIdInLists; ShowName = cls.ShowNameInLists; this.Columns = new ObservableCollection <ColumnDisplayModel>( props.Select(p => CreateColumnDisplayModel(mode, p)) .Concat(methods.Select(m => GridDisplayConfiguration.CreateColumnDisplayModel(m))) .ToList() ); }