Show / Hide Table of Contents

Class XmlResultWriter<TModel>

Result writer that formats data in an XML format using System.Xml.Serialization

Inheritance
Object
XmlResultWriter<TModel>
Implements
IResultWriter<TModel>
IResultWriter<TModel, Object>
Namespace: Seltzr.Results
Assembly: Seltzr.dll
Syntax
C#
public class XmlResultWriter<TModel> : IResultWriter<TModel>, IResultWriter<TModel, object> where TModel : class
Type Parameters
TModel

The type of serialized model

Constructors

| Improve this Doc View Source

XmlResultWriter()

Initializes a new instance of the XmlResultWriter<TModel> class

C#
public XmlResultWriter()

Methods

| Improve this Doc View Source

CanWriteAsync(HttpRequest)

Gets whether or not this IResultWriter<TModel, TUser> can write a result for the given request

C#
public virtual Task<bool> CanWriteAsync(HttpRequest request)
Parameters
requestHttpRequest

The request to test if a result can be written for it

Returns

Task<Boolean>

true

| Improve this Doc View Source

WriteResultAsync(IApiContext<TModel, Object>, IEnumerable<TModel>, FormattingOptions)

Formats the API result

C#
public virtual Task WriteResultAsync(IApiContext<TModel, object> context, IEnumerable<TModel> data, FormattingOptions options)
Parameters
contextIApiContext<TModel, Object>

The current API context

dataIEnumerable<TModel>

The dataset to format

optionsFormattingOptions

Options for formatting the result

Returns

Task

When the result has been sent

Implements

IResultWriter<TModel>
IResultWriter<TModel, TUser>
  • Improve this Doc
  • View Source
Back to top Generated by DocFX