示例#1
0
        /// <summary>
        /// Creates an instance of <see cref="PipRemapWriter"/>.
        /// </summary>
        public PipRemapWriter(PipExecutionContext pipExecutionContext, PipGraphFragmentContext pipGraphFragmentContext, Stream stream, bool debug = false, bool leaveOpen = true, bool logStats = false)
            : base(debug, stream, leaveOpen, logStats)
        {
            Contract.Requires(pipExecutionContext != null);
            Contract.Requires(pipGraphFragmentContext != null);
            Contract.Requires(stream != null);

            m_pipExecutionContext               = pipExecutionContext;
            m_pipGraphFragmentContext           = pipGraphFragmentContext;
            m_inliningWriter                    = new InliningWriter(stream, pipExecutionContext.PathTable, debug, leaveOpen, logStats);
            m_pipDataEntriesPointerInlineWriter = new PipDataEntriesPointerInlineWriter(m_inliningWriter, stream, pipExecutionContext.PathTable, debug, leaveOpen, logStats);
        }
示例#2
0
        /// <summary>
        /// Creates an instance of <see cref="PipRemapWriter"/>.
        /// </summary>
        public PipRemapWriter(PipExecutionContext pipExecutionContext, PipGraphFragmentContext pipGraphFragmentContext, Stream stream, bool leaveOpen = true, char alternateSymbolSeparator = default)
            : base(debug: false, stream, leaveOpen, logStats: false)
        {
            Contract.Requires(pipExecutionContext != null);
            Contract.Requires(pipGraphFragmentContext != null);
            Contract.Requires(stream != null);

            m_pipExecutionContext               = pipExecutionContext;
            m_pipGraphFragmentContext           = pipGraphFragmentContext;
            m_inliningWriter                    = new InliningWriter(stream, pipExecutionContext.PathTable, debug: false, leaveOpen, logStats: false);
            m_pipDataEntriesPointerInlineWriter = new PipDataEntriesPointerInlineWriter(this, stream, pipExecutionContext.PathTable, debug: false, leaveOpen, logStats: false);

            m_alternateSymbolSeparatorAsArray  = alternateSymbolSeparator != default ? new char[] { alternateSymbolSeparator } : new char[0];
            m_alternateSymbolSeparatorAsString = alternateSymbolSeparator != default ? alternateSymbolSeparator.ToString() : string.Empty;
        }