public BaseLanguageWriter(ILanguage language, IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments)
 {
     this.Language = language;
     this.formatter = formatter;
     this.exceptionFormatter = exceptionFormatter;
     this.WriteExceptionsAsComments = writeExceptionsAsComments;
 }
Esempio n. 2
0
        public ResponseWriter(IExceptionFormatter exceptionformatter)
        {
            if (exceptionformatter == null) throw new ArgumentNullException("exceptionFormatter");
            Contract.EndContractBlock();

            _exceptionformatter = exceptionformatter;
        }
Esempio n. 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ReadOnlyKernel"/> class.
        /// </summary>
        /// <param name="settings">The <see cref="INinjectSettings"/>.</param>
        /// <param name="bindings">The preconfigured bindings.</param>
        /// <param name="cache">The <see cref="ICache"/> component.</param>
        /// <param name="planner">The <see cref="IPlanner"/> component.</param>
        /// <param name="constructorScorer">The <see cref="IConstructorScorer"/> component.</param>
        /// <param name="pipeline">The <see cref="IPipeline"/> component.</param>
        /// <param name="exceptionFormatter">The <see cref="IExceptionFormatter"/> component.</param>
        /// <param name="bindingPrecedenceComparer">The <see cref="IBindingPrecedenceComparer"/> component.</param>
        /// <param name="bindingResolvers">The binding resolvers.</param>
        /// <param name="missingBindingResolvers">The missing binding resolvers.</param>
        internal ReadOnlyKernel(
            INinjectSettings settings,
            Dictionary <Type, ICollection <IBinding> > bindings,
            ICache cache,
            IPlanner planner,
            IConstructorScorer constructorScorer,
            IPipeline pipeline,
            IExceptionFormatter exceptionFormatter,
            IBindingPrecedenceComparer bindingPrecedenceComparer,
            List <IBindingResolver> bindingResolvers,
            List <IMissingBindingResolver> missingBindingResolvers)
        {
            this.settings                = settings;
            this.bindings                = bindings;
            this.bindingResolvers        = bindingResolvers;
            this.missingBindingResolvers = missingBindingResolvers;
            this.cache                     = cache;
            this.planner                   = planner;
            this.constructorScorer         = constructorScorer;
            this.pipeline                  = pipeline;
            this.exceptionFormatter        = exceptionFormatter;
            this.bindingPrecedenceComparer = bindingPrecedenceComparer;

            this.AddReadOnlyKernelBinding <IReadOnlyKernel>(this, bindings);
            this.AddReadOnlyKernelBinding <IResolutionRoot>(this, bindings);
        }
        public static string Format(this LoggerExtension extension, Exception exception)
        {
            Type type = exception.GetType();
            IExceptionFormatter formatter = Logger.ExceptionFormatters.ContainsKey(type) ? Logger.ExceptionFormatters[type] : Logger.ExceptionFormatters[typeof(Exception)];

            return(formatter.Format(exception));
        }
Esempio n. 5
0
 public IntermediateLanguageAssemblyAttributeWriter(ILanguage language, IFormatter formatter, IExceptionFormatter exceptionFormatter, IWriterSettings settings)
 {
     this.Language           = language;
     this.formatter          = formatter;
     this.exceptionFormatter = exceptionFormatter;
     this.Settings           = settings;
 }
Esempio n. 6
0
 public BaseLanguageWriter(ILanguage language, IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments)
 {
     this.Language                  = language;
     this.formatter                 = formatter;
     this.exceptionFormatter        = exceptionFormatter;
     this.WriteExceptionsAsComments = writeExceptionsAsComments;
 }
Esempio n. 7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Context"/> class.
        /// </summary>
        /// <param name="kernel">The kernel managing the resolution.</param>
        /// <param name="settings">The ninject settings.</param>
        /// <param name="request">The context's request.</param>
        /// <param name="binding">The context's binding.</param>
        /// <param name="cache">The cache component.</param>
        /// <param name="planner">The planner component.</param>
        /// <param name="pipeline">The pipeline component.</param>
        /// <param name="exceptionFormatter">The <see cref="IExceptionFormatter"/> component.</param>
        /// <exception cref="ArgumentNullException"><paramref name="kernel"/> is <see langword="null"/>.</exception>
        /// <exception cref="ArgumentNullException"><paramref name="settings"/> is <see langword="null"/>.</exception>
        /// <exception cref="ArgumentNullException"><paramref name="request"/> is <see langword="null"/>.</exception>
        /// <exception cref="ArgumentNullException"><paramref name="binding"/> is <see langword="null"/>.</exception>
        /// <exception cref="ArgumentNullException"><paramref name="cache"/> is <see langword="null"/>.</exception>
        /// <exception cref="ArgumentNullException"><paramref name="planner"/> is <see langword="null"/>.</exception>
        /// <exception cref="ArgumentNullException"><paramref name="pipeline"/> is <see langword="null"/>.</exception>
        /// <exception cref="ArgumentNullException"><paramref name="exceptionFormatter"/> is <see langword="null"/>.</exception>
        public Context(IReadOnlyKernel kernel, INinjectSettings settings, IRequest request, IBinding binding, ICache cache, IPlanner planner, IPipeline pipeline, IExceptionFormatter exceptionFormatter)
        {
            Ensure.ArgumentNotNull(kernel, nameof(kernel));
            Ensure.ArgumentNotNull(settings, nameof(settings));
            Ensure.ArgumentNotNull(request, nameof(request));
            Ensure.ArgumentNotNull(binding, nameof(binding));
            Ensure.ArgumentNotNull(cache, nameof(cache));
            Ensure.ArgumentNotNull(planner, nameof(planner));
            Ensure.ArgumentNotNull(pipeline, nameof(pipeline));
            Ensure.ArgumentNotNull(exceptionFormatter, nameof(exceptionFormatter));

            this.settings           = settings;
            this.Kernel             = kernel;
            this.Request            = request;
            this.Binding            = binding;
            this.Parameters         = request.Parameters.Union(binding.Parameters);
            this.Cache              = cache;
            this.Planner            = planner;
            this.Pipeline           = pipeline;
            this.exceptionFormatter = exceptionFormatter;

            if (binding.Service.IsGenericTypeDefinition)
            {
                this.HasInferredGenericArguments = true;
                this.GenericArguments            = request.Service.GenericTypeArguments;
            }
        }
 public BaseLanguageWriter(ILanguage language, IFormatter formatter, IExceptionFormatter exceptionFormatter, IWriterSettings settings)
 {
     this.Language           = language;
     this.formatter          = formatter;
     this.exceptionFormatter = exceptionFormatter;
     this.Settings           = settings;
 }
Esempio n. 9
0
 public PlainTextEntryFormatter(IExceptionFormatter exceptionFormatter)
 {
     if (exceptionFormatter == null)
     {
         throw new ArgumentNullException(nameof(exceptionFormatter));
     }
     _exceptionFormatter = exceptionFormatter;
 }
		public IntermediateLanguageAssemblyAttributeWriter(ILanguage language, IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments, bool shouldGenerateBlocks)
        {
            this.Language = language;
            this.formatter = formatter;
			this.exceptionFormatter = exceptionFormatter;
			this.WriteExceptionsAsComments = writeExceptionsAsComments;
			this.shouldGenerateBlocks = shouldGenerateBlocks;
		}
Esempio n. 11
0
 public IntermediateLanguageAssemblyAttributeWriter(ILanguage language, IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments, bool shouldGenerateBlocks)
 {
     this.Language                  = language;
     this.formatter                 = formatter;
     this.exceptionFormatter        = exceptionFormatter;
     this.WriteExceptionsAsComments = writeExceptionsAsComments;
     this.shouldGenerateBlocks      = shouldGenerateBlocks;
 }
 public BaseAssemblyAttributeWriter(ILanguage language, IExceptionFormatter exceptionFormatter, IWriterSettings settings)
 {
     base();
     this.set_Language(language);
     this.exceptionFormatter = exceptionFormatter;
     this.set_Settings(settings);
     return;
 }
Esempio n. 13
0
 public GenerationSteps(IUserInputProvider userInputProvider, IExecutingPluginAssemblyProvider assemblyProvider, ITools tools, ITimeKeeper timeKeeper, IConsoleWriter consoleWriter, IExceptionFormatter exceptionFormatter)
 {
     _userInputProvider  = userInputProvider;
     _assemblyProvider   = assemblyProvider;
     _tools              = tools;
     _timeKeeper         = timeKeeper;
     _consoleWriter      = consoleWriter;
     _exceptionFormatter = exceptionFormatter;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="PropertyInjectionStrategy"/> class.
        /// </summary>
        /// <param name="injectorFactory">The injector factory component.</param>
        /// <param name="settings">The ninject settings.</param>
        /// <param name="exceptionFormatter">The <see cref="IExceptionFormatter"/> component.</param>
        /// <exception cref="ArgumentNullException"><paramref name="injectorFactory"/> is <see langword="null"/>.</exception>
        /// <exception cref="ArgumentNullException"><paramref name="settings"/> is <see langword="null"/>.</exception>
        /// <exception cref="ArgumentNullException"><paramref name="exceptionFormatter"/> is <see langword="null"/>.</exception>
        public PropertyInjectionStrategy(IInjectorFactory injectorFactory, INinjectSettings settings, IExceptionFormatter exceptionFormatter)
        {
            Ensure.ArgumentNotNull(injectorFactory, nameof(injectorFactory));
            Ensure.ArgumentNotNull(settings, nameof(settings));
            Ensure.ArgumentNotNull(exceptionFormatter, nameof(exceptionFormatter));

            this.injectorFactory    = injectorFactory;
            this.settings           = settings;
            this.exceptionFormatter = exceptionFormatter;
        }
Esempio n. 15
0
        public BugReporter(string apiKey, IExceptionFormatter exceptionFormatter = null)
        {
            _apiKey = apiKey;
            if (exceptionFormatter == null)
            {
                _exceptionFormatter = new DefaultExceptionFormatter();
            }
            else
            {
                _exceptionFormatter = exceptionFormatter;
            }

            UserAuthorizationCheck = x => true;
        }
Esempio n. 16
0
        public BugReporter(string apiKey, IExceptionFormatter exceptionFormatter = null)
        {
            _apiKey = apiKey;
            if (exceptionFormatter == null)
            {
                _exceptionFormatter = new DefaultExceptionFormatter();
            }
            else
            {
                _exceptionFormatter = exceptionFormatter;
            }

            UserAuthorizationCheck = x => true;
        }
 //aynı metodun overload edilmiş hali, kullanıcı isterse parametre olarak
 //IExceptionformatter' ı kendisi verebilir.
 public static ExceptionManager getInstance(IExceptionFormatter exceptionFormatter)
 {
     if (instance == null)
     {
         lock (objectlock)
         {
             if (instance == null)
             {
                 instance = new ExceptionManager(exceptionFormatter);
             }
         }
     }
     return(instance);
 }
Esempio n. 18
0
        internal static void HandleApplicationError(HttpContextBase context, IExceptionFormatter exceptionFormatter)
        {
            HttpServerUtilityBase httpServerUtility = context.Server;
            Exception             exception         = httpServerUtility.GetLastError();

            HttpException httpException = exception as HttpException;

            if (httpException != null)
            {
                exceptionFormatter.LogHttpException(context.Request, httpException);
            }
            else
            {
                exceptionFormatter.LogException(exception);
            }
        }
Esempio n. 19
0
        public ContextBenchmark()
        {
            var requestParameters = new List <IParameter>
            {
                new ConstructorArgument("foo", 5),
                new ConstructorArgument("boo", 7),
                new PropertyValue("name", "Tom")
            };

            var bindingParameters = new List <IParameter>
            {
                new ConstructorArgument("abc", 2),
                new ConstructorArgument("def", 1),
                new PropertyValue("ghi", "Dirk")
            };

            _requestWithParameters    = CreateRequest(requestParameters);
            _requestWithoutParameters = CreateRequest(Array.Empty <IParameter>());

            _bindingWithParameters    = CreateBinding(bindingParameters);
            _bindingWithoutParameters = CreateBinding(Array.Empty <IParameter>());

            _ninjectSettings = new NinjectSettings
            {
                // Disable to reduce memory pressure
                ActivationCacheDisabled = true,
                LoadExtensions          = false
            };
            _kernelConfiguration = new KernelConfiguration(_ninjectSettings);
            _kernel             = _kernelConfiguration.BuildReadOnlyKernel();
            _cache              = _kernelConfiguration.Components.Get <ICache>();
            _planner            = _kernelConfiguration.Components.Get <IPlanner>();
            _pipeline           = _kernelConfiguration.Components.Get <IPipeline>();
            _exceptionFormatter = _kernelConfiguration.Components.Get <IExceptionFormatter>();

            _contextWithRequestParameters              = CreateContext(_requestWithParameters, _bindingWithoutParameters);
            _contextWithBindingParameters              = CreateContext(_requestWithoutParameters, _bindingWithParameters);
            _contextWithRequestAndBindingParameters    = CreateContext(_requestWithParameters, _bindingWithParameters);
            _contextWithoutRequestAndBindingParameters = CreateContext(_requestWithoutParameters, _bindingWithoutParameters);
        }
Esempio n. 20
0
 internal MyReadOnlyKernel(INinjectSettings settings,
                           Dictionary <Type, ICollection <IBinding> > bindings,
                           ICache cache,
                           IPlanner planner,
                           IConstructorScorer constructorScorer,
                           IPipeline pipeline,
                           IExceptionFormatter exceptionFormatter,
                           IBindingPrecedenceComparer bindingPrecedenceComparer,
                           List <IBindingResolver> bindingResolvers,
                           List <IMissingBindingResolver> missingBindingResolvers)
     : base(settings,
            bindings,
            cache,
            planner,
            constructorScorer,
            pipeline,
            exceptionFormatter,
            bindingPrecedenceComparer,
            bindingResolvers,
            missingBindingResolvers)
 {
 }
Esempio n. 21
0
        /// <summary> Creates and configures a new logger. </summary>
        /// <param name="loggerName"> The name of the logger. </param>
        /// <param name="exceptionFormatter"> An instance of an exception formatter. </param>
        /// <param name="logCreation"> Whether to immediately log its creation. </param>
        public ConfiguredNLogger(ELoggerName loggerName, IExceptionFormatter exceptionFormatter, string subdirectory = "", bool logCreation = false)
        {
            ExceptionFormatter = exceptionFormatter;

            _logger        = LogManager.GetLogger(loggerName.ToString());
            _messageFormat = "{0} : {1}{2}";

            var nlogConfigurationVariables = LogManager.Configuration.Variables;

            if (loggerName == ELoggerName.FileLogger)
            {
                nlogConfigurationVariables[EVariableName.FileName]   = @$ "{(string.IsNullOrWhiteSpace(subdirectory) ? " Logs " : subdirectory)}\Log_" + DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss") + ".log";
                nlogConfigurationVariables[EVariableName.FileLayout] = "${longdate:format=yyyy/MM/dd_HH:mm:ss} ${level:upperCase=true} / ${message}";
            }
            else if (loggerName == ELoggerName.ConsoleLogger)
            {
                nlogConfigurationVariables[EVariableName.ConsoleLayout] = "${time} ${level:upperCase=true} / ${message}";
            }

            if (logCreation)
            {
                LogInstantiation(this);
            }
        }
		public BaseImperativeLanguageWriter(ILanguage language, IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments)
			: base(language, formatter, exceptionFormatter, writeExceptionsAsComments)
		{
			this.KeyWordWriter = CreateKeyWordWriter();
		}
		public NamespaceImperativeLanguageWriter(ILanguage language, IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments)
			: base(language, formatter, exceptionFormatter, writeExceptionsAsComments)
		{
			writeNamespacesandUsings = false;
			writeFullyQualifiedNames = false;
		}
Esempio n. 24
0
 public override IAssemblyAttributeWriter GetAssemblyAttributeWriter(IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments)
 {
     return new VisualBasicAssemblyAttributeWriter(this, formatter, exceptionFormatter, writeExceptionsAsComments);
 }
        public IntermediateLanguageAttributeWriter(ILanguage language, IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments, bool shouldGenerateBlocks)
			: base(language, formatter, exceptionFormatter, writeExceptionsAsComments, shouldGenerateBlocks) { }
 public abstract IAssemblyAttributeWriter GetAssemblyAttributeWriter(IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments);
Esempio n. 27
0
 /// <summary>
 /// 构造函数
 /// </summary>
 protected internal HttpWebExceptionHandler(ILogService logService, IExceptionFormatter exceptionFormatter)
     : base(logService, exceptionFormatter)
 {
 }
Esempio n. 28
0
 public override IAssemblyAttributeWriter GetAssemblyAttributeWriter(IFormatter formatter, IExceptionFormatter exceptionFormatter, IWriterSettings settings)
 {
     return(new CSharpAssemblyAttributeWriter(this, formatter, exceptionFormatter, settings));
 }
Esempio n. 29
0
 public HttpErrorFilter(IExceptionFormatter exceptionFormatter)
 {
     _exceptionFormatter = exceptionFormatter;
 }
 public override ILanguageWriter GetWriter(IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments)
 {
     return new IntermediateLanguageWriter(this, formatter, exceptionFormatter, writeExceptionsAsComments, ShouldGenerateBlocks);
 }
 public CSharpAssemblyAttributeWriter(ILanguage language, IFormatter formatter, IExceptionFormatter exceptionFormatter, IWriterSettings settings)
     : base(language, exceptionFormatter, settings)
 {
     this.writer = new CSharpAssemblyAttributeInternalWriter(language, formatter, exceptionFormatter, settings);
     this.writer.ExceptionThrown += OnExceptionThrown;
 }
Esempio n. 32
0
 public override ILanguageWriter GetWriter(IFormatter formatter, IExceptionFormatter exceptionFormatter, IWriterSettings settings)
 {
     return new VisualBasicWriter(this, formatter, exceptionFormatter, settings);
 }
Esempio n. 33
0
 public override IAssemblyAttributeWriter GetAssemblyAttributeWriter(IFormatter formatter, IExceptionFormatter exceptionFormatter, IWriterSettings settings)
 {
     return new VisualBasicAssemblyAttributeWriter(this, formatter, exceptionFormatter, settings);
 }
 public VisualBasicWriter(ILanguage language, IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments)
     : base(language, formatter, exceptionFormatter, writeExceptionsAsComments)
 {
 }
 public CSharpAssemblyAttributeInternalWriter(ILanguage language, IFormatter formatter, IExceptionFormatter exceptionFormatter, IWriterSettings settings)
     : base(language, formatter, exceptionFormatter, settings)
 {
 }
 public abstract IAssemblyAttributeWriter GetAssemblyAttributeWriter(IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments);
Esempio n. 37
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="logService">日志记录器</param>
 /// <param name="exceptionFormatter">信息收集格式化接口</param>
 protected internal ExceptionHandler(ILogService logService, IExceptionFormatter exceptionFormatter)
 {
     this.LogService = logService;
     this.exceptionFormatter = exceptionFormatter;
 }
Esempio n. 38
0
 public abstract IAssemblyAttributeWriter GetAssemblyAttributeWriter(IFormatter formatter, IExceptionFormatter exceptionFormatter, IWriterSettings settings);
Esempio n. 39
0
 public abstract ILanguageWriter GetWriter(IFormatter formatter, IExceptionFormatter exceptionFormatter, IWriterSettings settings);
		public BaseAssemblyAttributeWriter(ILanguage language, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments)
        {
            this.Language = language;
			this.exceptionFormatter = exceptionFormatter;
			this.WriteExceptionsAsComments = writeExceptionsAsComments;
		}
Esempio n. 41
0
 public abstract ILanguageWriter GetWriter(IFormatter formatter, IExceptionFormatter exceptionFormatter, IWriterSettings settings);
 public override ILanguageWriter GetWriter(IFormatter formatter, IExceptionFormatter exceptionFormatter, IWriterSettings settings)
 {
     return new IntermediateLanguageWriter(this, formatter, exceptionFormatter, settings);
 }
Esempio n. 43
0
 public abstract IAssemblyAttributeWriter GetAssemblyAttributeWriter(IFormatter formatter, IExceptionFormatter exceptionFormatter, IWriterSettings settings);
Esempio n. 44
0
 public VisualBasicAssemblyAttributeWriter(ILanguage language, IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments)
     : base(language, exceptionFormatter, writeExceptionsAsComments)
 {
     this.writer = new VisualBasicAssemblyAttributeInternalWriter(language, formatter, exceptionFormatter, writeExceptionsAsComments);
     this.writer.ExceptionThrown += OnExceptionThrown;
 }
 public abstract ILanguageWriter GetWriter(IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments);
Esempio n. 46
0
 public VisualBasicAssemblyAttributeInternalWriter(ILanguage language, IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments)
     : base(language, formatter, exceptionFormatter, writeExceptionsAsComments)
 {
 }
Esempio n. 47
0
 public LoggerProxyOptions WithExceptionFormatter(IExceptionFormatter customExceptionFormatter)
 {
     ExceptionFormatter = customExceptionFormatter;
     return(this);
 }
 public IntermediateLanguageWriter(ILanguage language, IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments, bool shouldGenerateBlocks)
     : base(language, formatter, exceptionFormatter, writeExceptionsAsComments)
 {
     this.shouldGenerateBlocks = shouldGenerateBlocks;
     this.flagsWriter = new FlagsWriter(this);
 }
Esempio n. 49
0
 public override ILanguageWriter GetWriter(IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments)
 {
     return new VisualBasicWriter(this, formatter, exceptionFormatter, writeExceptionsAsComments);
 }
Esempio n. 50
0
		public NamespaceImperativeLanguageWriter(ILanguage language, IFormatter formatter, IExceptionFormatter exceptionFormatter, IWriterSettings settings)
		{
			base(language, formatter, exceptionFormatter, settings);
			this.writeNamespacesandUsings = false;
			return;
		}
		public CSharpAssemblyAttributeWriter(ILanguage language, IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments)
			: base(language, exceptionFormatter, writeExceptionsAsComments)
        {
			this.writer = new CSharpAssemblyAttributeInternalWriter(language, formatter, exceptionFormatter, writeExceptionsAsComments);
        }
			public VisualBasicAssemblyAttributeInternalWriter(ILanguage language, IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments)
				: base(language, formatter, exceptionFormatter, writeExceptionsAsComments)
			{
			}
 public abstract ILanguageWriter GetWriter(IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments);
 public NamespaceImperativeLanguageWriter(ILanguage language, IFormatter formatter, IExceptionFormatter exceptionFormatter, IWriterSettings settings)
     : base(language, formatter, exceptionFormatter, settings)
 {
     writeNamespacesandUsings = false;
 }
Esempio n. 55
0
 public IntermediateLanguageAttributeWriter(ILanguage language, IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments, bool shouldGenerateBlocks)
     : base(language, formatter, exceptionFormatter, writeExceptionsAsComments, shouldGenerateBlocks)
 {
 }
 public BaseImperativeLanguageWriter(ILanguage language, IFormatter formatter, IExceptionFormatter exceptionFormatter, IWriterSettings settings)
     : base(language, formatter, exceptionFormatter, settings)
 {
     this.KeyWordWriter = CreateKeyWordWriter();
 }
Esempio n. 57
0
 public override ILanguageWriter GetWriter(IFormatter formatter, IExceptionFormatter exceptionFormatter, IWriterSettings settings)
 {
     return(new CSharpWriter(this, formatter, exceptionFormatter, settings));
 }
Esempio n. 58
0
 public override ILanguageWriter GetWriter(IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments)
 {
     return(new CSharpWriter(this, formatter, exceptionFormatter, writeExceptionsAsComments));
 }
Esempio n. 59
0
 public override IAssemblyAttributeWriter GetAssemblyAttributeWriter(IFormatter formatter, IExceptionFormatter exceptionFormatter, bool writeExceptionsAsComments)
 {
     return(new CSharpAssemblyAttributeWriter(this, formatter, exceptionFormatter, writeExceptionsAsComments));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ExceptionFormatterFactory"/> class.
 /// </summary>
 /// <param name="builders">The builders.</param>
 public ExceptionFormatterFactory(IExceptionFormatterBuilder[] builders)
 {
     builders = builders ?? new IExceptionFormatterBuilder[0];
     _defaultExceptionFormatter = new TextExceptionFormatter(this);
     _builders = new FunctionKeyedCollection<Type, IExceptionFormatterBuilder>(x => x.BaseExceptionType, builders);
 }