Beispiel #1
0
        private string getOtherPropertySentence(UserNameAndProperty userNameAndProperty)
        {
            var verb = "is";

            if (userNameAndProperty.userProperty.name.EndsWith("s")) //TODO: use naturallanguage to determine if plural
            {
                verb = "are";
            }
            return(string.Format(otherPropertySentence, userNameAndProperty.userName, userNameAndProperty.userProperty.name, verb, userNameAndProperty.userProperty.value));
        }
 private string otherPropertySentence = "{0} is {1}."; //TODO: XX says XX is XX, if multiple people say it use XX is XX
 private string getOtherPropertySentence(UserNameAndProperty userNameAndProperty)
 {
     return(string.Format(otherPropertySentence, userNameAndProperty.userName, userNameAndProperty.userProperty.value));
 }