public PocoData(Type pocoType, string tableName, string keyspaceName, LookupKeyedCollection <string, PocoColumn> columns, string[] partitionkeys, Tuple <string, SortOrder>[] clusteringKeys, bool caseSensitive, bool compact, bool allowFiltering) { if (partitionkeys == null) { throw new ArgumentNullException("partitionkeys"); } if (clusteringKeys == null) { throw new ArgumentNullException("clusteringKeys"); } PocoType = pocoType ?? throw new ArgumentNullException("pocoType"); TableName = tableName ?? throw new ArgumentNullException("tableName"); Columns = columns ?? throw new ArgumentNullException("columns"); CaseSensitive = caseSensitive; CompactStorage = compact; AllowFiltering = allowFiltering; KeyspaceName = keyspaceName; _columnsByMemberName = columns.ToDictionary(c => c.MemberInfo.Name, c => c); PartitionKeys = partitionkeys.Where(columns.Contains).Select(key => columns[key]).ToList(); ClusteringKeys = clusteringKeys.Where(c => columns.Contains(c.Item1)).Select(c => Tuple.Create(columns[c.Item1], c.Item2)).ToList(); _primaryKeys = new HashSet <string>(PartitionKeys.Select(p => p.ColumnName).Concat(ClusteringKeys.Select(c => c.Item1.ColumnName))); MissingPrimaryKeyColumns = new List <string>(); if (PartitionKeys.Count != partitionkeys.Length) { MissingPrimaryKeyColumns.AddRange(partitionkeys.Where(k => !columns.Contains(k))); } if (ClusteringKeys.Count != clusteringKeys.Length) { MissingPrimaryKeyColumns.AddRange(partitionkeys.Where(k => !columns.Contains(k))); } }