コード例 #1
0
        public UnityDataFormatter()
        {
            _formatter = new BinaryFormatter();
            _surrogate = new UnitySerializationSurrogate();

            _formatter.SurrogateSelector = _surrogate;
        }
コード例 #2
0
        public UnityDataFormatter(IFormatter formatter)
        {
            if (formatter == null)
            {
                throw new System.ArgumentNullException("formatter");
            }

            _formatter = formatter;
            _surrogate = new UnitySerializationSurrogate();

            _formatter.SurrogateSelector = _surrogate;
        }