Пример #1
0
        private bool IsValidName()
        {
            if (currentName == StringSegment.Empty)
            {
                return(false);
            }

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

            return(true);
        }
Пример #2
0
        private static bool IsProtocolValid(StringSegment protocol)
        {
            if (protocol == StringSegment.Empty)
            {
                return(false);
            }

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

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