System.Net.Http.HttpRequestMessage.MarkAsSent C# (CSharp) Method

MarkAsSent() private method

private MarkAsSent ( ) : bool
return bool
        internal bool MarkAsSent()
        {
            return Interlocked.Exchange(ref _sendStatus, MessageAlreadySent) == MessageNotYetSent;
        }

Usage Example

Beispiel #1
0
 private static void CheckRequestMessage(HttpRequestMessage request)
 {
     if (!request.MarkAsSent())
     {
         throw new InvalidOperationException("The request message was already sent. Cannot send the same request message multiple times.");
     }
 }
All Usage Examples Of System.Net.Http.HttpRequestMessage::MarkAsSent