Table of Contents

Class ApplicationResponse<T>

Namespace
Dynamicweb.Core
Assembly
Dynamicweb.Core.dll

The Generic ApplicationResponse class gives information about the result of a given application service operation.

[Serializable]
public class ApplicationResponse<T> : ISerializable

Type Parameters

T

The Generic Type that the Response handles

Inheritance
ApplicationResponse<T>
Implements
Derived
Inherited Members

Constructors

ApplicationResponse()

Initializes the Response class with a value indicating the success or failure of the operation returning the response

public ApplicationResponse()

Remarks

Initializes as succeded.

ApplicationResponse(bool)

Initializes the Response class with a value indicating the success or failure of the operation returning the response

public ApplicationResponse(bool succeeded)

Parameters

succeeded bool

A value indicating the success or failure of the operation returning the response

ApplicationResponse(bool, T?)

Initializes the Response class with a value indicating the success or failure of the operation returning the response, along with any relevant return data of the generic type T

public ApplicationResponse(bool succeeded, T? data)

Parameters

succeeded bool

A value indicating the success or failure of the operation returning the response

data T

The data returned from the operation

ApplicationResponse(Exception)

Initializes a new instance of the Response class with an Exception indicating what went wrong in the operation returning the response

public ApplicationResponse(Exception exceptionData)

Parameters

exceptionData Exception

A Exception explaining why the operation failed

Exceptions

ArgumentNullException

ApplicationResponse(Exception, T?)

Initializes a new instance of the Response class with an Exception indicating what went wrong in the operation returning the response

public ApplicationResponse(Exception exceptionData, T? data)

Parameters

exceptionData Exception

A Exception explaining why the operation failed

data T

The data returned from the operation

Exceptions

ArgumentNullException

ApplicationResponse(SerializationInfo, StreamingContext)

Initializes a new instance of the ApplicationResponse<T> class.

protected ApplicationResponse(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

The information.

context StreamingContext

The context.

Properties

Data

Gets the data associated with the result of the operation returning the response

public T? Data { get; init; }

Property Value

T

ExceptionData

Gets any exception data associated with a non successful response

public Exception? ExceptionData { get; init; }

Property Value

Exception

Message

Gets the message explaining why the operation failed

public string? Message { get; set; }

Property Value

string

Succeeded

Gets a value indicating the success or failure of the operation

public bool Succeeded { get; init; }

Property Value

bool

Methods

GetObjectData(SerializationInfo, StreamingContext)

Populates a SerializationInfo with the data needed to serialize the target object.

public virtual void GetObjectData(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

The SerializationInfo to populate with data.

context StreamingContext

The destination (see StreamingContext) for this serialization.

To top