/// ------------------------------------------------------------------------------------ /// <summary> /// Adds to the phone cache, information about the specified phone. /// </summary> /// ------------------------------------------------------------------------------------ public void AddPhone(string phone) { if (!string.IsNullOrEmpty(phone)) { this[phone] = new PhoneInfo(_project.AmbiguousSequences, phone); } }
/// ------------------------------------------------------------------------------------ public void AddUndefinedPhone(string phone) { IPhoneInfo phoneInfo; if (!TryGetValue(phone, out phoneInfo)) { this[phone] = new PhoneInfo(_project.AmbiguousSequences, phone, true); } else { if (phoneInfo is PhoneInfo) { (phoneInfo as PhoneInfo).IsUndefined = true; } } }
/// ------------------------------------------------------------------------------------ /// <summary> /// Returns a clone of the phone information object. /// </summary> /// ------------------------------------------------------------------------------------ public IPhoneInfo Clone() { var clone = new PhoneInfo(_ambiguousSequences, Phone); clone.Description = Description; clone.TotalCount = TotalCount; clone.CountAsNonPrimaryUncertainty = CountAsNonPrimaryUncertainty; clone.CountAsPrimaryUncertainty = CountAsPrimaryUncertainty; clone.CharType = CharType; clone._moaKey = MOAKey; clone._poaKey = POAKey; clone._baseChar = _baseChar; clone.SiblingUncertainties = new List <string>(SiblingUncertainties); clone.IsUndefined = IsUndefined; clone._aMask = AMask.Clone(); clone._bMask = BMask.Clone(); clone._defaultAMask = DefaultAMask.Clone(); clone._defaultBMask = DefaultBMask.Clone(); return(clone); }