src/LaunchDarkly.EventSource/EventParser.cs
/// <summary>
/// Determines if the specified value contains a field in a Server Sent Event message.
/// </summary>
/// <remarks>
/// This method looks for the index of a first occuring colon character in the specified value. Returns true if the index is greater than zero (a zero index value would indicate a comment rather than a field).
/// </remarks>
/// <param name="value">The value.</param>
/// <returns>
///   <c>true</c> if the specified value contains a field; otherwise, <c>false</c>.
/// </returns>
Determines if the specified value contains a field in a Server Sent Event message.
Determines if the specified value contains a field in a Server Sent Event message .
public static bool ContainsField(string value)
        {
            if (string.IsNullOrWhiteSpace(value)) return false;
            return value.IndexOf(":", StringComparison.Ordinal) > 0;
        }
public static bool ContainsField ( string value ) { if ( string . IsNullOrWhiteSpace ( value ) ) return false ; return value . IndexOf ( " " , StringComparison . Ordinal ) > 0 ; }
Determines if the specified value contains a field in a Server Sent Event message.
Determines if the specified value contains a field in a Server Sent Event message .
None
value
string
None
remarks
This method looks for the index of a first occuring colon character in the specified value. Returns true if the index is greater than zero (a zero index value would indicate a comment rather than a field).
This method looks for the index of a first occuring colon character in the specified value . Returns true if the index is greater than zero ( a zero index value would indicate a comment rather than a field ) .