Пример #1
0
        /// <summary>
        ///   Dynamically generates factory method for delegates that can be used to deserialize the state vector.
        /// </summary>
        internal unsafe OpenSerializationDelegate CreateDeserializer()
        {
            var generator = new SerializationGenerator(methodName: "Deserialize");

            generator.GenerateDeserializationCode(Groups);
            return(generator.Compile <OpenSerializationDelegate>());
        }
Пример #2
0
        /// <summary>
        ///   Dynamically generates factory method for delegates that can be used to deserialize the state vector.
        /// </summary>
        /// <param name="objects">The objects whose data is stored in the state vector.</param>
        internal unsafe SerializationDelegate CreateDeserializer(ObjectTable objects)
        {
            var generator = new SerializationGenerator(methodName: "Deserialize");

            generator.GenerateDeserializationCode(Groups);
            return(generator.Compile <SerializationDelegate>(objects));
        }