Ejemplo n.º 1
0
        protected virtual string InitTitle()
        {
            string title = "the Aspect";

            if (Aspects == Aspects.None)
            {
                return(title);
            }

            if (Aspects == Aspects.All)
            {
                title += " of Infinity";
                return(title);
            }

            Aspects[] flags =
                _InitialAspects.Not(a => a == Aspects.None || a == Aspects.All).Where(a => Aspects.HasFlag(a)).ToArray();

            if (flags.Length > 0)
            {
                title += " of ";

                for (int i = 0; i < flags.Length; i++)
                {
                    title += flags[i];

                    if (i + 1 < flags.Length)
                    {
                        title += i + 2 < flags.Length ? ", " : " and ";
                    }
                }
            }

            return(title);
        }