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 SourceDeserialize(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 |
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 |
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 |