예제 #1
0
        /// <devdoc>
        ///     Serialized value into the writer.
        /// </devdoc>
        private void SerializeInternal(TextWriter output, object value)
        {
            if (value == null)
            {
                return;
            }

            if (_typeTable == null)
            {
                _typeTable = new HybridDictionary();
            }
            else
            {
                _typeTable.Clear();
            }

#if NO_BASE64
            SerializeValue(output, value);
#else
            LosWriter writer = new LosWriter();

            SerializeValue(writer, value);

            writer.CompleteTransforms(output, EnableViewStateMac, _macKey);
            writer.Dispose();
#endif
        }
예제 #2
0
        /// <devdoc>
        ///     Serialized value into the writer.
        /// </devdoc>
        private void SerializeInternal(TextWriter output, object value) {
            if (value == null)
                return;

            if (_typeTable == null) 
                _typeTable = new HybridDictionary();
            else 
                _typeTable.Clear();

#if NO_BASE64
            SerializeValue(output, value);
#else 

            LosWriter writer = new LosWriter();

            SerializeValue(writer, value);

            writer.CompleteTransforms(output, EnableViewStateMac, _macKey); 
            writer.Dispose();
#endif

        }