コード例 #1
0
 public VpaTableViewModel(VpaTable table, VertiPaqAnalyzerViewModel parentViewModel)
 {
     _table                = table;
     _parentViewModel      = parentViewModel;
     Columns               = _table.Columns.Select(c => new VpaColumnViewModel(c, this));
     ColumnMaxTotalSize    = Columns.Max(c => c.TotalSize);
     ColumnsMaxCardinality = Columns.Max(c => c.ColumnCardinality);
     RelationshipsFrom     = _table.RelationshipsFrom.Select(r => new VpaRelationshipViewModel(r, this));
     if (RelationshipsFrom.Count() > 0)
     {
         RelationshipMaxFromCardinality = RelationshipsFrom.Max(r => r.FromColumnCardinality);
         RelationshipMaxToCardinality   = RelationshipsFrom.Max(r => r.ToColumnCardinality);
     }
 }
コード例 #2
0
 public VpaTableViewModel(VpaTable table, VertiPaqAnalyzerViewModel parentViewModel, VpaSort sort)
 {
     _table           = table;
     _parentViewModel = parentViewModel;
     Columns          = _table.Columns.Select(c => new VpaColumnViewModel(c, this));
     if (Columns.Count() > 0)
     {
         ColumnMaxTotalSize    = Columns.Max(c => c.TotalSize);
         ColumnsMaxCardinality = Columns.Max(c => c.ColumnCardinality);
     }
     RelationshipsFrom = _table.RelationshipsFrom.Select(r => new VpaRelationshipViewModel(r, this));
     if (RelationshipsFrom.Count() > 0)
     {
         RelationshipMaxFromCardinality = RelationshipsFrom.Max(r => r.FromColumnCardinality);
         RelationshipMaxToCardinality   = RelationshipsFrom.Max(r => r.ToColumnCardinality);
         RelationshipFromMissingKeys    = RelationshipsFrom.Sum(r => r.MissingKeys);
         RelationshipInvalidRows        = RelationshipsFrom.Sum(r => r.InvalidRows);
     }
     _sort = sort;
 }