Example #1
0
        private bool IsValidName()
        {
            if (currentName == StringSegment.Empty)
            {
                return(false);
            }

            if (!SipCharacters.IsValidToken(currentName))
            {
                return(false);
            }

            return(true);
        }
Example #2
0
        private static bool IsProtocolValid(StringSegment protocol)
        {
            if (protocol == StringSegment.Empty)
            {
                return(false);
            }

            if (!SipCharacters.IsValidToken(protocol))
            {
                return(false);
            }

            return(true);
        }
Example #3
0
        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);
        }
Example #4
0
 private static bool IsMethodValid(ReadOnlyMemory <byte> bytes)
 {
     return(!bytes.IsEmpty && SipCharacters.IsValidToken(bytes.Span));
 }
Example #5
0
 private static bool IsMethodValid(StringSegment chars)
 {
     return(chars.Length > 0 && SipCharacters.IsValidToken(chars));
 }
Example #6
0
 private static bool IsMethodValid(ReadOnlyMemory <char> chars)
 {
     return(!chars.IsEmpty && SipCharacters.IsValidToken(chars.Span));
 }