Example #1
0
 internal BinarySerializationContext(BinaryPropertyWriter visitor, BinaryAdapterCollection.Enumerator adapters, TValue value, bool isRoot)
 {
     m_Visitor  = visitor;
     m_Adapters = adapters;
     m_Value    = value;
     m_IsRoot   = isRoot;
 }
        /// <summary>
        /// Gets the shared <see cref="BinaryPropertyWriter"/>.
        /// </summary>
        /// <returns>The <see cref="BinaryPropertyWriter"/>.</returns>
        internal BinaryPropertyWriter GetBinaryPropertyWriter()
        {
            if (null != m_BinaryPropertyWriter)
            {
                return(m_BinaryPropertyWriter.IsLocked ? new BinaryPropertyWriter() : m_BinaryPropertyWriter);
            }

            m_BinaryPropertyWriter = new BinaryPropertyWriter();
            return(m_BinaryPropertyWriter);
        }
Example #3
0
 /// <summary>
 /// Gets the shared <see cref="BinaryPropertyWriter"/>.
 /// </summary>
 /// <returns>The <see cref="BinaryPropertyWriter"/>.</returns>
 internal BinaryPropertyWriter GetBinaryPropertyWriter()
 => m_BinaryPropertyWriter ?? (m_BinaryPropertyWriter = new BinaryPropertyWriter());