Show / Hide Table of Contents

Interface ISerializer

Implementations of this interface are able to deserialize commands from JSON strings while ensuring that any properties marked with the SecurityPropertyAttribute are not included in the deserialization process.

Namespace: FunctionMonkey.Abstractions
Assembly: FunctionMonkey.Abstractions.dll
Syntax
public interface ISerializer

Methods

| Improve this Doc View Source

Deserialize(Type, String, Boolean)

Deserializes a command from the provided string

Declaration
object Deserialize(Type type, string value, bool enforceSecurityProperties = true)
Parameters
Type Name Description
Type type

The type of the command

System.String value

The serialized representation

System.Boolean enforceSecurityProperties

True if SecurityPropertyAttribute behaviour should be applied, defaults to true

Returns
Type Description
System.Object

A deserialized command

| Improve this Doc View Source

Deserialize<TCommand>(String, Boolean)

Deserializes a command from the provided string

Declaration
TCommand Deserialize<TCommand>(string value, bool enforceSecurityProperties = true)
Parameters
Type Name Description
System.String value

The serialized representation

System.Boolean enforceSecurityProperties

True if SecurityPropertyAttribute behaviour should be applied, defaults to true

Returns
Type Description
TCommand

A deserialized command

Type Parameters
Name Description
TCommand

The type of the command

| Improve this Doc View Source

Serialize<TModel>(TModel, Boolean)

Deserializes a command from the provided string

Declaration
string Serialize<TModel>(TModel value, bool enforceSecurityProperties = true)
Parameters
Type Name Description
TModel value

The model

System.Boolean enforceSecurityProperties

True if SecurityPropertyAttribute behaviour should be applied, defaults to true

Returns
Type Description
System.String

A deserialized command

Type Parameters
Name Description
TModel

The model type to serialize

Extension Methods

OpenApiFluentValidationHelper.IsNumeric(Object)
OpenApiFluentValidationHelper.NumericToInt(Object)
OpenApiFluentValidationHelper.NumericToDouble(Object)
OpenApiFluentValidationHelper.NumericToDecimal(Object)
  • Improve this Doc
  • View Source
  • 0 Comments
In This Article
  • Methods
    • Deserialize(Type, String, Boolean)
    • Deserialize<TCommand>(String, Boolean)
    • Serialize<TModel>(TModel, Boolean)
  • Extension Methods
Back to top Copyright © 2018 James Randall