Class Environment.SerializerType
Class used to define how something should be serialized. The class doesn't contain any serialization logic.
Inheritance
Inherited Members
Namespace: Experior.Core
Assembly: Experior.Core.dll
Syntax
[Serializable]
public class SerializerType : IEquatable<string>, IEquatable<Environment.SerializerType>
Constructors
SerializerType()
Default constructor
Declaration
public SerializerType()
Remarks
Please add a TypeName.
SerializerType(String)
Constructor that takes in a typeName
and stores it in TypeName
Declaration
public SerializerType(string typeName)
Parameters
Type | Name | Description |
---|---|---|
System.String | typeName | The name of the serialization method |
Fields
Binary
SerializerType that serializes in a binary format.
Declaration
public static readonly Environment.SerializerType Binary
Field Value
Type | Description |
---|---|
Environment.SerializerType |
JSON
SerializerType that uses XML for serialization.
Declaration
public static readonly Environment.SerializerType JSON
Field Value
Type | Description |
---|---|
Environment.SerializerType |
XML
SerializerType that uses XML for serialization.
Declaration
public static readonly Environment.SerializerType XML
Field Value
Type | Description |
---|---|
Environment.SerializerType |
Properties
TypeName
The serialization method name.
Declaration
public string TypeName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
Equals(Environment.SerializerType)
Checks is the input Environment.SerializerType matches this.
Declaration
public bool Equals(Environment.SerializerType other)
Parameters
Type | Name | Description |
---|---|---|
Environment.SerializerType | other | The Environment.SerializerType to compare |
Returns
Type | Description |
---|---|
System.Boolean |
|
Equals(String)
Checks is the input string matches its TypeName.
Declaration
public bool Equals(string other)
Parameters
Type | Name | Description |
---|---|---|
System.String | other | The type name to compare |
Returns
Type | Description |
---|---|
System.Boolean |
|
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | The type name as a string |
Overrides
TryParse(String, out Environment.SerializerType)
Tries to return a known Environment.SerializerType based on a string. The method will only check for built in Environment.SerializerTypes:
XML | xml |
Binary | binary |
JSON | json |
Declaration
public static bool TryParse(string typeName, out Environment.SerializerType serializerType)
Parameters
Type | Name | Description |
---|---|---|
System.String | typeName | The type name as a string. |
Environment.SerializerType | serializerType | The SerializerType matching the |
Returns
Type | Description |
---|---|
System.Boolean |
|