Пример #1
0
        public SentenceIndex(string index)
        {
            if (index.Length != INDEX_CHAR_COUNT)
            {
                Program.log.ErrorFormat("Input sentence index is incorrect: contains less or more than {0} symbols: {1}", INDEX_CHAR_COUNT, index);
                index1Info = IndexInfoSentenceType.Undefined;
                index2Info = IndexInfoInserts.Undefined;
                index3Info = IndexInfoOneCan.Undefined;
                index4Info = IndexInfoParsingError.Undefined;

                info5Info = new IndexAppliedAlgorithms();
                info5Info.Value = "-1";
                info5Info.IsUndefined = true;
                info5Info.HasAppliedAlgorithms = false;
            }
            else
            {

                index1Info = IndexInfoSentenceType.ReadFromString(index[0].ToString());
                index2Info = IndexInfoInserts.ReadFromString(index[1].ToString());
                index3Info = IndexInfoOneCan.ReadFromString(index[2].ToString());
                index4Info = IndexInfoParsingError.ReadFromString(index[3].ToString());

                info5Info = new IndexAppliedAlgorithms();
                info5Info.Value = "0";
                info5Info.IsUndefined = false;
                info5Info.HasAppliedAlgorithms = false;
            }
        }
Пример #2
0
 public static string ToLogString(IndexInfoInserts value)
 {
     switch (value.Value)
     {
         case "0": return "No Inserts";
         case "3": return "Inserts presented";
         default: return "Undefined";
     }
 }