public LabelQueryStringBuilder SetFields(LabelFields fields)
        {
            _fieldsAction = () =>
            {
                if (fields.HasFlag(LabelFields.All))// All fields are default
                {
                    return;
                }

                var labelFields = fields.GetFlagEnumValues()
                                  .Select(f => f.GetAttribute <StringValueAttribute, LabelFields>())
                                  .Where(att => att != null)
                                  .Select(att => att.Text)
                                  .ToList();

                string fieldsValue = string.Concat("labels(", string.Join(",", labelFields), ")");

                SetParameter("fields", fieldsValue);
            };

            return(this);
        }
示例#2
0
 public AimsCsvReader(LabelFields labelType)
 {
     _labelType = labelType;
 }