Beispiel #1
0
        /// <summary>
        ///     Instantiates a new object out of a string pickle.
        /// </summary>
        /// <typeparam name="T">type of value to be unpickled.</typeparam>
        /// <param name="pickle">text pickle of value.</param>
        /// <param name="streamingContext">payload object for StreamingContext; defaults to null.</param>
        /// <returns>unpickled instance.</returns>
        public T UnPickleOfString <T>(string pickle, Object streamingContext = null)
        {
            var sc = Utils.GetStreamingContext(streamingContext);

            return(_textSerializer.UnPickleOfString <T>(pickle, streamingContext: sc.ToOption()));
        }
Beispiel #2
0
        /// <summary>
        ///     Instantiates a new object out of a string pickle.
        /// </summary>
        /// <typeparam name="T">type of value to be unpickled.</typeparam>
        /// <param name="pickle">text pickle of value.</param>
        /// <param name="streamingContext">payload object for StreamingContext; defaults to null.</param>
        /// <returns>unpickled instance.</returns>
        public T UnPickleOfString <T>(string pickle, Object streamingContext = null)
        {
            var sc = Utils.GetStreamingContext(streamingContext);

            return(_textPickler.UnPickleOfString <T>(pickle, streamingContext: sc));
        }