private static bool IsDisplayNameValid(StringSegment chars) { if (chars == StringSegment.Empty) { return(true); } if (SipCharacters.IsValidQuoted(chars)) { return(true); } if (SipCharacters.IsValidTokenExcludeWhitespase(chars)) { return(true); } return(false); }
private bool IsValidValue() { if (isSingleName) { return(true); } if (currentValue == StringSegment.Empty) { return(false); } if (SipCharacters.IsValidQuoted(currentValue)) { return(true); } if (!SipCharacters.IsValidToken(currentValue)) { return(false); } return(true); }