コード例 #1
0
 public IndexedPropertyDescriptor(DataSchema dataSchema, int index, Type propertyType, IColumnCaption displayName, PivotedColumnId pivotedColumnId, Attribute[] attributes)
     : base(@"property" + index, displayName, dataSchema.DataSchemaLocalizer, MergeAttributes(dataSchema, displayName, attributes))
 {
     PropertyIndex    = index;
     _propertyType    = propertyType;
     _pivotedColumnId = pivotedColumnId;
 }
コード例 #2
0
ファイル: GroupAndTotaler.cs プロジェクト: laeubisoft/pwiz
        public IndexedPropertyDescriptor MakePropertyDescriptor(int index, ImmutableList <object> columnHeaderKey,
                                                                PropertyDescriptor originalPropertyDescriptor, IColumnCaption caption, AggregateOperation aggregateOperation)
        {
            IColumnCaption  qualifiedCaption;
            PivotedColumnId pivotedColumnId = null;

            if (columnHeaderKey.Count == 0)
            {
                qualifiedCaption = caption;
            }
            else
            {
                var pivotCaptionComponents = columnHeaderKey.Select(CaptionComponentList.MakeCaptionComponent).ToList();
                qualifiedCaption = new CaptionComponentList(pivotCaptionComponents.Append(caption));
                pivotedColumnId  = new PivotedColumnId(columnHeaderKey,
                                                       new CaptionComponentList(pivotCaptionComponents),
                                                       caption,
                                                       caption);
            }
            var attributes = DataSchema.GetAggregateAttributes(originalPropertyDescriptor, aggregateOperation).ToArray();

            return(new IndexedPropertyDescriptor(DataSchema, index, aggregateOperation.GetPropertyType(originalPropertyDescriptor.PropertyType),
                                                 qualifiedCaption, pivotedColumnId, attributes));
        }