• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class StringPassThroughMediaTypeFormatter

A MediaTypeFormatter that simply allows strings to pass through WebAPI and be associated with the specified MIME type.

Inheritance
System.Object
StringPassThroughMediaTypeFormatter
Namespace: DotNetNuke.Web.Api
Assembly: DotNetNuke.Web.dll
Syntax
public class StringPassThroughMediaTypeFormatter : MediaTypeFormatter

Constructors

| Improve this Doc View Source

StringPassThroughMediaTypeFormatter()

Initializes a new instance of the StringPassThroughMediaTypeFormatter class. Initialize a formatter that can handle text/plain and text/html.

Declaration
public StringPassThroughMediaTypeFormatter()
| Improve this Doc View Source

StringPassThroughMediaTypeFormatter(IEnumerable<String>)

Initializes a new instance of the StringPassThroughMediaTypeFormatter class. Initialize a formatter that can handle the specified media types.

Declaration
public StringPassThroughMediaTypeFormatter(IEnumerable<string> mediaTypes)
Parameters
Type Name Description
IEnumerable<System.String> mediaTypes

Methods

| Improve this Doc View Source

CanReadType(Type)

A MediaTypeFormatter that simply allows strings to pass through WebAPI and be associated with the specified MIME type.

Declaration
public override bool CanReadType(Type type)
Parameters
Type Name Description
Type type
Returns
Type Description
System.Boolean
| Improve this Doc View Source

CanWriteType(Type)

A MediaTypeFormatter that simply allows strings to pass through WebAPI and be associated with the specified MIME type.

Declaration
public override bool CanWriteType(Type type)
Parameters
Type Name Description
Type type
Returns
Type Description
System.Boolean
| Improve this Doc View Source

ReadFromStreamAsync(Type, Stream, System.Net.Http.HttpContent, IFormatterLogger)

A MediaTypeFormatter that simply allows strings to pass through WebAPI and be associated with the specified MIME type.

Declaration
public override Task<object> ReadFromStreamAsync(Type type, Stream readStream, System.Net.Http.HttpContent content, IFormatterLogger formatterLogger)
Parameters
Type Name Description
Type type
Stream readStream
System.Net.Http.HttpContent content
IFormatterLogger formatterLogger
Returns
Type Description
Task<System.Object>
| Improve this Doc View Source

WriteToStreamAsync(Type, Object, Stream, System.Net.Http.HttpContent, TransportContext)

A MediaTypeFormatter that simply allows strings to pass through WebAPI and be associated with the specified MIME type.

Declaration
public override Task WriteToStreamAsync(Type type, object value, Stream writeStream, System.Net.Http.HttpContent content, TransportContext transportContext)
Parameters
Type Name Description
Type type
System.Object value
Stream writeStream
System.Net.Http.HttpContent content
TransportContext transportContext
Returns
Type Description
Task

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS