public UnityDataFormatter() { _formatter = new BinaryFormatter(); _surrogate = new UnitySerializationSurrogate(); _formatter.SurrogateSelector = _surrogate; }
public UnityDataFormatter(IFormatter formatter) { if (formatter == null) { throw new System.ArgumentNullException("formatter"); } _formatter = formatter; _surrogate = new UnitySerializationSurrogate(); _formatter.SurrogateSelector = _surrogate; }