FilterItem 类 |
命名空间: Gridsum.Common.QueryIntegration
该类型:FilterItem暴露了以下成员:
名称 | 说明 | |
---|---|---|
FilterItem |
名称 | 说明 | |
---|---|---|
Equals | (继承自 Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (继承自 Object.) | |
GetHashCode | Serves as a hash function for a particular type. (继承自 Object.) | |
GetType | Gets the Type of the current instance. (继承自 Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (继承自 Object.) | |
ToString | Returns a string that represents the current object. (继承自 Object.) |
名称 | 说明 | |
---|---|---|
ToScript |
根据传递的键名对,生成相应的过滤脚本
(定义如下 FilterExtension.) | |
Validate |
验证过滤器是否正确
(定义如下 FilterExtension.) |
名称 | 说明 | |
---|---|---|
Children |
获取或设置子过滤器FilterItem | |
ConcatType |
获取或设置过滤器间ConcatType,该属性只有在过滤类型为分组的时候被使用
| |
FilterItemType |
获取或设置FilterItemType信息
| |
FilterOn |
获取或设置过滤的列,该列必须是元数据中的列的键
| |
FilterType |
获取或设置FilterType信息
| |
FilterValues |
获取或设置过滤器的数据,该数据只有过滤类型为单一类型的时候
| |
Options |
获取或设置额外的参数信息
|
FilterItem filter = new FilterItem(); filter.FilterItemType = FilterItemType.Group; filter.ConcatType = ConcatType.And; filter.Children = new List<FilterItem>(); FilterItem advertiserChild = new FilterItem(); advertiserChild.FilterItemType = FilterItemType.Single; advertiserChild.FilterOn = "Advertiser.AdvertiserId"; advertiserChild.FilterType = FilterType.Equal; advertiserChild.FilterValues = new object[]{1}; filter.Children.Add(advertiserChild); FilterItem statusChild = new FilterItem(); statusChild.FilterItemType = FilterItemType.Single; statusChild.FilterOn = "Campaign.Status"; statusChild.FilterType = FilterType.Equal; statusChild.FilterValues = new object[]{"Active"}; filter.Children.Add(statusChild);