コード例 #1
0
ファイル: Worker.cs プロジェクト: buildigor/vanovich
 private void ReplaceValue(int wordLenght, ISentenceElement element, string newElement)
 {
     if (element.SentenceElementType == SentenceElementTypes.Word && element.Value.Length == wordLenght)
     {
         element.Value = newElement;
     }
 }
コード例 #2
0
ファイル: WordWorker.cs プロジェクト: Alexandr-ixarka/project
 public void ReplaceValue(int wordLenght, ISentenceElement element, string newValue)
 {
     if (element.SentenceElementType == SentenceElementType.Word && GetWordLength(element) == wordLenght)
     {
         element.Value = newValue;
     }
 }
コード例 #3
0
ファイル: WordWorker.cs プロジェクト: ZalesskyMaxim/Task2
 public void ReplaceValue(int wordLenght, ISentenceElement element, string newValue)
 {
     if (element.SentenceElementType == SentenceElementType.Word && GetWordLength(element) == wordLenght)
     {
         element.Value = newValue;
     }
 }
コード例 #4
0
ファイル: Sentence.cs プロジェクト: ououououoououyyyyy/Text
 public void AddSentenceElement(ISentenceElement element)
 {
     SentenceList.Add(element);
     if (element is Word)
     {
         CountWords++;
     }
 }
コード例 #5
0
 public bool IsQuestionMark(ISentenceElement element)
 {
     if (element.SentenceElementType == SentenceElementType.PunctuationMark)
     {
         if (element.Value.Equals("?"))
         {
             return true;
         }
         else return false;
     }
     else return false;
 }
コード例 #6
0
ファイル: WordWorker.cs プロジェクト: ZalesskyMaxim/Task2
 public bool FirstLetterIsConsonant(ISentenceElement element)
 {
     string pattern = @"[aeiou]";
     if (element.SentenceElementType == SentenceElementType.Word)
     {
         if (!string.IsNullOrEmpty(element.Value) && !(Regex.Matches(element.Value[0].ToString(), pattern).Count > 0))
         {
             return true;
         }
         else return false;
     }
     else return false;
 }
コード例 #7
0
 public bool IsQuestionMark(ISentenceElement element)
 {
     if (element.SentenceElementType == SentenceElementType.PunctuationMark)
     {
         if (element.Value.Equals("?"))
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     else
     {
         return(false);
     }
 }
コード例 #8
0
ファイル: WordWorker.cs プロジェクト: Alexandr-ixarka/project
        public bool FirstLetterIsConsonant(ISentenceElement element)
        {
            string pattern = @"[aeiou]";

            if (element.SentenceElementType == SentenceElementType.Word)
            {
                if (!string.IsNullOrEmpty(element.Value) && !(Regex.Matches(element.Value[0].ToString(), pattern).Count > 0))
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }
コード例 #9
0
ファイル: Sentence.cs プロジェクト: Alexandr-ixarka/project
 public void AddElementToEnd(ISentenceElement element)
 {
     _sententenceElements.Add(element);
 }
コード例 #10
0
 public Sentence(ISentenceElement sentence)
 {
     SentenceElements.Add(sentence);
 }
コード例 #11
0
ファイル: Sentence.cs プロジェクト: ZalesskyMaxim/Task2
 public void AddElementToEnd(ISentenceElement element)
 {
     _sententenceElements.Add(element);
 }
コード例 #12
0
ファイル: WordWorker.cs プロジェクト: alexandrkozich/Task_2
 public int GetWordLength(ISentenceElement element)
 {
     return(element.Value.Length);
 }
コード例 #13
0
ファイル: WordWorker.cs プロジェクト: ZalesskyMaxim/Task2
 public int GetWordLength(ISentenceElement element)
 {
     return element.Value.Length;
 }