Class StringPassThroughMediaTypeFormatter
A MediaTypeFormatter that simply allows strings to pass through WebAPI and be associated with the specified MIME type.
Inheritance
System.Object
StringPassThroughMediaTypeFormatter
Assembly: DotNetNuke.Web.dll
public class StringPassThroughMediaTypeFormatter : MediaTypeFormatter
Constructors
|
Improve this Doc
View Source
Declaration
public StringPassThroughMediaTypeFormatter()
|
Improve this Doc
View Source
Declaration
public StringPassThroughMediaTypeFormatter(IEnumerable<string> mediaTypes)
Parameters
Type |
Name |
Description |
IEnumerable<System.String> |
mediaTypes |
|
Methods
|
Improve this Doc
View Source
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
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
Extension Methods