private bool TrySetAsCurrentIfValid(SipParameter parameter) { if (!IsValidName()) { return(false); } if (!IsValidValue()) { return(false); } currentParameter = new SipParameter(currentName, currentValue); return(true); }
private bool TrySliceParameter(out SipParameter parameter) { parameter = new SipParameter(); if (remainingChars == StringSegment.Empty) { return(false); } if (!TrySliceFirstChar(ParameterSeparatorChar)) { return(false); } currentName = SliceName().Trim(); isSingleName = !TrySliceFirstChar(NameValueSeparatorChar); if (!isSingleName) { currentValue = SliceValue().Trim(); } return(true); }
public static bool IsSingleName(this SipParameter parameter) { return(parameter.Value == StringSegment.Empty); }