Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,28 @@ public BasicHtmlWebResponseObject(HttpResponseMessage response, Stream contentSt
#region Properties

/// <summary>
/// Gets the Content property.
/// Gets the text body content of this response.
/// </summary>
/// <value>
/// Content of the response body, decoded using <see cref="Encoding"/>,
/// if the <c>Content-Type</c> response header is a recognized text
/// type. Otherwise <c>null</c>.
/// </value>
public new string Content { get; private set; }

/// <summary>
/// Gets the Encoding that was used to decode the Content.
/// Gets the encoding of the text body content of this response.
/// </summary>
/// <value>
/// The Encoding used to decode the Content; otherwise, a null reference if the content is not text.
/// Encoding of the response body from the <c>Content-Type</c> header,
/// or <c>null</c> if the encoding could not be determined.
/// </value>
public Encoding Encoding { get; private set; }

private WebCmdletElementCollection _inputFields;

/// <summary>
/// Gets the Fields property.
/// Gets the HTML input field elements parsed from <see cref="Content"/>.
/// </summary>
public WebCmdletElementCollection InputFields
{
Expand All @@ -99,7 +105,7 @@ public WebCmdletElementCollection InputFields
private WebCmdletElementCollection _links;

/// <summary>
/// Gets the Links property.
/// Gets the HTML a link elements parsed from <see cref="Content"/>.
/// </summary>
public WebCmdletElementCollection Links
{
Expand All @@ -126,7 +132,7 @@ public WebCmdletElementCollection Links
private WebCmdletElementCollection _images;

/// <summary>
/// Gets the Images property.
/// Gets the HTML img elements parsed from <see cref="Content"/>.
/// </summary>
public WebCmdletElementCollection Images
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ public partial class WebResponseObject
#region Properties

/// <summary>
/// Gets or protected sets the Content property.
/// Gets or protected sets the response body content.
/// </summary>
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
public byte[] Content { get; protected set; }

/// <summary>
/// Gets the StatusCode property.
/// Gets the response status code.
/// </summary>
public int StatusCode
{
get { return (WebResponseHelper.GetStatusCode(BaseResponse)); }
}

/// <summary>
/// Gets the StatusDescription property.
/// Gets the response status description.
/// </summary>
public string StatusDescription
{
Expand All @@ -41,24 +41,27 @@ public string StatusDescription

private MemoryStream _rawContentStream;
/// <summary>
/// Gets the RawContentStream property.
/// Gets the response body content as a <see cref="MemoryStream"/>.
/// </summary>
public MemoryStream RawContentStream
{
get { return (_rawContentStream); }
}

/// <summary>
/// Gets the RawContentLength property.
/// Gets the length (in bytes) of <see cref="RawContentStream"/>.
/// </summary>
public long RawContentLength
{
get { return (RawContentStream == null ? -1 : RawContentStream.Length); }
}

/// <summary>
/// Gets or protected sets the RawContent property.
/// Gets or protected sets the full response content.
/// </summary>
/// <value>
/// Full response content, including the HTTP status line, headers, and body.
/// </value>
public string RawContent { get; protected set; }

#endregion Properties
Expand Down