This project is read-only.
Custom serializer
Custom serializer designed for flexible and fast binary serialization of different objects. You can easy convert objects and add own serialization rules.

public class Test1 {
  public int field1;

// need to be convert to:

public class Test1 {
  public int[] field1;

// it's easy:

var settings = new CustomSerializerSettings(true, true, CustomSerializerConvertError.CallHandler);

settings.CustomSerializerConverter =
    (value, type, name, targetType) => {
        if (type == typeof (Test1) && name == "field1" && !value.GetType().IsArray)
            return new[] {(int) value};
        return value;

Last edited Jun 1, 2015 at 8:18 AM by Denisio, version 4