Exemplo n.º 1
0
        public override string ToString()
        {
            if (FileName.EndsWithAny(new[] { ".less", ".css", ".scss" }))
            {
                if (Phrase.HasValue() == false)
                {
                    return(FileName);
                }

                var splittedDisplayPath = DisplayPath.Split('\\');
                if (splittedDisplayPath.Length == 4 || splittedDisplayPath.Length < 4)
                {
                    return("{0} -----> {1}".FormatWith(Phrase, DisplayPath));
                }
                else
                {
                    var path = splittedDisplayPath.Skip(splittedDisplayPath.Length - 3).Aggregate((a, b) => a + "\\" + b);
                    return("{0} -----> {1}".FormatWith(Phrase, path));
                }
            }
            else
            {
                return(Phrase.HasValue() ? "{0} -----> {1}".FormatWith(Phrase, DisplayPath) : FileName);
            }
        }
Exemplo n.º 2
0
        public override string ToString()
        {
            const string format = "{0}    -----> {1}";

            if (!FileName.EndsWithAny(styleExtensions))
            {
                return(Phrase.HasValue() ? format.FormatWith(Phrase, DisplayPath) : FileName);
            }

            if (!Phrase.HasValue())
            {
                return(FileName);
            }

            var splittedDisplayPath = DisplayPath.Split('\\');

            if (splittedDisplayPath.Length <= 4)
            {
                return(format.FormatWith(Phrase, DisplayPath));
            }

            var path = splittedDisplayPath.Skip(splittedDisplayPath.Length - 3).Aggregate((a, b) => a + "\\" + b);

            return(format.FormatWith(Phrase, path));
        }