• API Documentation
Show / Hide Table of Contents
  • Rssdp
    • AggregateSsdpDeviceLocator
    • CustomHttpHeader
    • CustomHttpHeadersCollection
    • DeviceAvailableEventArgs
    • DeviceEventArgs
    • DeviceNetworkType
    • DeviceNetworkTypeExtensions
    • DeviceUnavailableEventArgs
    • DiscoveredSsdpDevice
    • ExceptionExtensions
    • ISsdpLogger
    • NullLogger
    • ServiceEventArgs
    • SocketClosedException
    • SocketFactory
    • SsdpDevice
    • SsdpDeviceExtensions
    • SsdpDeviceIcon
    • SsdpDeviceLocator
    • SsdpDevicePropertiesCollection
    • SsdpDeviceProperty
    • SsdpDevicePublisher
    • SsdpEmbeddedDevice
    • SsdpRootDevice
    • SsdpService
    • SsdpStandardsMode
    • SsdpTraceLogger
  • Rssdp.Infrastructure
    • DisposableManagedObjectBase
    • HttpParserBase<T>
    • HttpRequestParser
    • HttpResponseParser
    • ISocketFactory
    • ISsdpCommunicationsServer
    • ISsdpDeviceLocator
    • ISsdpDevicePublisher
    • IUdpSocket
    • IUpnpDeviceValidator
    • ReceivedUdpData
    • RequestReceivedEventArgs
    • ResponseReceivedEventArgs
    • SsdpCommunicationsServer
    • SsdpConstants
    • SsdpDeviceLocatorBase
    • SsdpDevicePublisherBase
    • UdpEndPoint
    • Upnp10DeviceValidator

Class HttpParserBase<T>

A base class for the HttpResponseParser and HttpRequestParser classes. Not intended for direct use.

Inheritance
System.Object
HttpParserBase<T>
HttpRequestParser
HttpResponseParser
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Rssdp.Infrastructure
Assembly: cs.temp.dll.dll
Syntax
public abstract class HttpParserBase<T>
    where T : new()
Type Parameters
Name Description
T

Methods

IsContentHeader(String)

Returns a boolean indicating whether the specified HTTP header name represents a content header (true), or a message header (false).

Declaration
protected abstract bool IsContentHeader(string headerName)
Parameters
Type Name Description
System.String headerName

A string containing the name of the header to return the type of.

Returns
Type Description
System.Boolean

Parse(T, Http.Headers.HttpHeaders, String)

Parses a string containing either an HTTP request or response into a or object.

Declaration
protected virtual HttpContent Parse(T message, Http.Headers.HttpHeaders headers, string data)
Parameters
Type Name Description
T message

A or object representing the parsed message.

System.Net.Http.Headers.HttpHeaders headers

A reference to the collection for the message object.

System.String data

A string containing the data to be parsed.

Returns
Type Description
HttpContent

An object containing the content of the parsed message.

Parse(String)

Parses the data provided into either a or object.

Declaration
public abstract T Parse(string data)
Parameters
Type Name Description
System.String data

A string containing the HTTP message to parse.

Returns
Type Description
T

Either a or object containing the parsed data.

ParseHttpVersion(String)

Parses the HTTP version text from an HTTP request or response status line and returns a System.Version object representing the parsed values.

Declaration
protected static Version ParseHttpVersion(string versionData)
Parameters
Type Name Description
System.String versionData

A string containing the HTTP version, from the message status line.

Returns
Type Description
System.Version

A System.Version object containing the parsed version data.

ParseStatusLine(String, T)

Used to parse the first line of an HTTP request or response and assign the values to the appropriate properties on the message.

Declaration
protected abstract void ParseStatusLine(string data, T message)
Parameters
Type Name Description
System.String data

The first line of the HTTP message to be parsed.

T message

Either a or to assign the parsed values to.

In This Article
Back to top Copyright (c) 2015 Troy Willmot