public override string ToString()
        {
            var result = string.Empty;

            if (Hierarchies.Count > 0)
            {
                result += "Hierarchies: ";

                result += string.Join(", ",
                                      Hierarchies.Where(h => h.FieldId.HasValue)
                                      .Select(h => h.FieldId.Value.ToString())
                                      .ToArray());
            }

            if (KeyFilters.Count > 0)
            {
                if (!string.IsNullOrEmpty(result))
                {
                    result += " ";
                }

                result += "KeyFilters: ";

                result += string.Join(", ",
                                      KeyFilters.Where(h => h.FieldId.HasValue)
                                      .Select(h => h.FieldId.Value.ToString())
                                      .ToArray());
            }

            if (!string.IsNullOrEmpty(result))
            {
                return(result);
            }

            return(new ToStringResult <MetadataNavigationSettingsDefinition>(this)
                   .ToString());
        }
Exemple #2
0
        public override string ToString()
        {
            var result = string.Empty;

            if (Hierarchies.Count > 0)
            {
                result += "Hierarchies: ";

                result += string.Join(", ",
                                      Hierarchies.Where(h => h.FieldId.HasValue)
                                      .Select(h => h.FieldId.Value.ToString())
                                      .ToArray());
            }

            if (KeyFilters.Count > 0)
            {
                if (!string.IsNullOrEmpty(result))
                {
                    result += " ";
                }

                result += "KeyFilters: ";

                result += string.Join(", ",
                                      KeyFilters.Where(h => h.FieldId.HasValue)
                                      .Select(h => h.FieldId.Value.ToString())
                                      .ToArray());
            }

            if (!string.IsNullOrEmpty(result))
            {
                return(result);
            }

            return(base.ToString());
        }