Пример #1
0
        public void CompleteDecompile(object item, DecompilationTarget target, FormatterChain containingChain)
        {
            _gutter.WriteEndDocument();
            _code.WriteEndDocument();
            _gutter.Close();
            _code.Close();

            _gutterStringWriter.Write(_codeStringWriter.ToString());
            _finalString = _gutterStringWriter.ToString();
            _codeStringWriter.Dispose();
        }
 /// <summary>
 /// Called when a decompilation operation has been completed.
 /// </summary>
 /// <param name="item">The item that was decompiled.</param>
 /// <param name="target">The decompilation target.</param>
 /// <param name="containingChain"></param>
 public void CompleteDecompile(object item, DecompilationTarget target, FormatterChain containingChain)
 {
 }
Пример #3
0
        /// <summary>
        /// Called when a part's imports have been satisfied and it is safe to use.
        /// </summary>
        public void OnImportsSatisfied()
        {
            _formatter = null;
            _stringWriter = new StringWriter();
            IFormatter formatter = new PlainTextFormatter(_stringWriter);

            // Get the hooks.
            if (_hooks != null)
            {
                var chain = new FormatterChain(_hooks);
                chain.Prepend(formatter);
                formatter = _formatter = chain;
            }

            LanguageWriter = _languageWriterCreator(formatter);
            if (LanguageWriter == null)
                throw new ArgumentOutOfRangeException("languageWriterCreator", Monoflector.Properties.Resources.LanguageWriterCreator_NullValue);
        }
Пример #4
0
        /// <summary>
        /// Called when a part's imports have been satisfied and it is safe to use.
        /// </summary>
        public void OnImportsSatisfied()
        {
            _stringWriter = new StringWriter();

            _chain = new FormatterChain(_hooks);

            LanguageWriter = _languageWriterCreator(_chain);
            if (LanguageWriter == null)
                throw new ArgumentOutOfRangeException("languageWriterCreator", Monoflector.Properties.Resources.LanguageWriterCreator_NullValue);
        }