Example #1
0
        private bool TrySetAsCurrentIfValid(SipParameter parameter)
        {
            if (!IsValidName())
            {
                return(false);
            }

            if (!IsValidValue())
            {
                return(false);
            }

            currentParameter = new SipParameter(currentName, currentValue);
            return(true);
        }
Example #2
0
        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);
        }
Example #3
0
 public static bool IsSingleName(this SipParameter parameter)
 {
     return(parameter.Value == StringSegment.Empty);
 }