public void CopyDataFrom(QuestTCPRange range) { count = range.count; low = new long[count]; hi = new long[count]; for (var i = 0; i < count; ++i) { hi[i] = range.hi[i]; low[i] = range.low[i]; } }
public void Add(QuestTCPRange other) { if (other.count == 0) { return; } Array.Resize(ref low, count + other.count); Array.Resize(ref hi, count + other.count); for (int i = 0; i < other.count; i++) { low[count + i] = other.low[i]; hi[count + i] = other.hi[i]; } count = count + other.count; }
// упрощает и распознает диапазон private string FixLitD(string str) { string tstr = ""; int l = str.Length; foreach (char c in str) { if (((c >= '0') && (c <= '9')) || (c == '-') || (c == ';') || (c == 'h')) { tstr += c; } } str = ';' + tstr + ';'; tstr = str; while (true) { str = tstr; tstr = StringReplace(tstr, "--", ""); tstr = StringReplace(tstr, ";;", ";"); tstr = StringReplace(tstr, "h;", ";"); tstr = StringReplace(tstr, ";h", ";"); tstr = StringReplace(tstr, "-;", ";"); tstr = StringReplace(tstr, "-h", "h"); tstr = StringReplace(tstr, "hh", "h"); if (str == tstr) { break; } } if ((tstr != ";") && (str.Length > 0)) { str = "[" + str.Substring(1, str.Length - 2) + "]"; QuestTCPRange d = new QuestTCPRange(); d.Assign(str); str = d.GetString(); return(str); } else { diapazone_error = true; error = true; return("[err]"); } }
public QuestTCPVariant() { vd = new QuestTCPRange(); Clear(); }