Esempio n. 1
0
        public string GetStoryText()
        {
            var firstChar = AsA.ToLowerInvariant()
                            .Replace("as an", String.Empty)
                            .Replace("as a", String.Empty)
                            .Trim()
                            .FirstOrDefault();

            var asAPrefix = "As a";

            if ("aeiouAEIOU".IndexOf(firstChar) >= 0)
            {
                asAPrefix = "As an";
            }

            if (!AsA.ToLowerInvariant().StartsWith("as a"))
            {
                AsA = $"{asAPrefix} {AsA}";
            }

            if (!IWant.ToLowerInvariant().StartsWith("i want"))
            {
                IWant = $"I want {IWant}";
            }

            if (!SoThat.ToLowerInvariant().StartsWith("so that"))
            {
                SoThat = $"So that {SoThat}";
            }

            return($"{AsA}" +
                   $"{Environment.NewLine}{IWant}" +
                   $"{Environment.NewLine}{SoThat}{Environment.NewLine}");
        }
Esempio n. 2
0
        public string GetStoryText()
        {
            if (!AsA.ToLower().StartsWith("as a"))
            {
                AsA = $"As a {AsA}";
            }
            if (!IWant.ToLower().StartsWith("i want"))
            {
                IWant = $"I want {IWant}";
            }
            if (!SoThat.ToLower().StartsWith("so that"))
            {
                SoThat = $"So that {SoThat}";
            }

            return($"{AsA}" +
                   $"{Environment.NewLine}{IWant}" +
                   $"{Environment.NewLine}{SoThat}{Environment.NewLine}");
        }
Esempio n. 3
0
        public string GetStoryText()
        {
            ValidateArguments();

            PopulateAsA();

            if (!IWant.StartsWith("i want", StringComparison.InvariantCultureIgnoreCase))
            {
                IWant = $"I want {IWant}";
            }

            if (!SoThat.StartsWith("so that", StringComparison.InvariantCultureIgnoreCase))
            {
                SoThat = $"So that {SoThat}";
            }

            return($"{AsA}" +
                   $"{Environment.NewLine}{IWant}" +
                   $"{Environment.NewLine}{SoThat}{Environment.NewLine}");
        }