当前位置: 首页>>代码示例>>C#>>正文


C# ExceptionlessConfiguration.AddPlugin方法代码示例

本文整理汇总了C#中ExceptionlessConfiguration.AddPlugin方法的典型用法代码示例。如果您正苦于以下问题:C# ExceptionlessConfiguration.AddPlugin方法的具体用法?C# ExceptionlessConfiguration.AddPlugin怎么用?C# ExceptionlessConfiguration.AddPlugin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ExceptionlessConfiguration的用法示例。


在下文中一共展示了ExceptionlessConfiguration.AddPlugin方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddDefaultPlugins

 public static void AddDefaultPlugins(ExceptionlessConfiguration config) {
     config.AddPlugin<ConfigurationDefaultsPlugin>();
     config.AddPlugin<SimpleErrorPlugin>();
     config.AddPlugin<DuplicateCheckerPlugin>();
     config.AddPlugin<EnvironmentInfoPlugin>();
     config.AddPlugin<SubmissionMethodPlugin>();
 }
开发者ID:megakid,项目名称:Exceptionless.Net,代码行数:7,代码来源:EventPluginManager.cs

示例2: AddDefaultPlugins

        public static void AddDefaultPlugins(ExceptionlessConfiguration config) {
            config.AddPlugin<HandleAggregateExceptionsPlugin>();
            config.AddPlugin<EventExclusionPlugin>();
            config.AddPlugin<ConfigurationDefaultsPlugin>();
#if !PORTABLE && !NETSTANDARD1_2
            config.AddPlugin<ErrorPlugin>();
#else
            config.AddPlugin<SimpleErrorPlugin>();
#endif
            config.AddPlugin<DuplicateCheckerPlugin>();
            config.AddPlugin<EnvironmentInfoPlugin>();
#if !PORTABLE && !NETSTANDARD1_2
            config.AddPlugin<VersionPlugin>();
#endif
            config.AddPlugin<SubmissionMethodPlugin>();
            config.AddPlugin<CancelSessionsWithNoUserPlugin>();
        }
开发者ID:InlineAsm,项目名称:Exceptionless.Net,代码行数:17,代码来源:EventPluginManager.cs

示例3: AddDefaultPlugins

 public static void AddDefaultPlugins(ExceptionlessConfiguration config) {
     config.AddPlugin<ConfigurationDefaultsPlugin>();
     config.AddPlugin<HandleAggregateExceptionsPlugin>();
     config.AddPlugin<SimpleErrorPlugin>();
     config.AddPlugin<DuplicateCheckerPlugin>();
     config.AddPlugin<EnvironmentInfoPlugin>();
     config.AddPlugin<SubmissionMethodPlugin>();
     config.AddPlugin<CancelSessionsWithNoUserPlugin>();
 }
开发者ID:adamzolotarev,项目名称:Exceptionless.Net,代码行数:9,代码来源:EventPluginManager.cs

示例4: VerifyPriority

        public void VerifyPriority() {
            var config = new ExceptionlessConfiguration(DependencyResolver.CreateDefault());
            foreach (var plugin in config.Plugins)
                config.RemovePlugin(plugin.Key);

            Assert.Equal(0, config.Plugins.Count());
            config.AddPlugin<EnvironmentInfoPlugin>();
            config.AddPlugin<PluginWithPriority11>();
            config.AddPlugin<PluginWithNoPriority>();
            config.AddPlugin("version", 1, ctx => ctx.Event.SetVersion("1.0.0.0"));
            config.AddPlugin("version2", 2, ctx => ctx.Event.SetVersion("1.0.0.0"));
            config.AddPlugin("version3", 3, ctx => ctx.Event.SetVersion("1.0.0.0"));

            var plugins = config.Plugins.ToArray();
            Assert.Equal(typeof(PluginWithNoPriority), plugins[0].Plugin.GetType());
            Assert.Equal("version", plugins[1].Key);
            Assert.Equal("version2", plugins[2].Key);
            Assert.Equal("version3", plugins[3].Key);
            Assert.Equal(typeof(PluginWithPriority11), plugins[4].Plugin.GetType());
            Assert.Equal(typeof(EnvironmentInfoPlugin), plugins[5].Plugin.GetType());
        }
开发者ID:adamzolotarev,项目名称:Exceptionless.Net,代码行数:21,代码来源:PluginTests.cs

示例5: CanDisposePlugin

        public void CanDisposePlugin() {
            var configuration = new ExceptionlessConfiguration(DependencyResolver.Default);
            foreach (var plugin in configuration.Plugins)
                configuration.RemovePlugin(plugin.Key);

            Assert.Equal(0, CounterTestPlugin.ConstructorCount);
            Assert.Equal(0, CounterTestPlugin.RunCount);
            Assert.Equal(0, CounterTestPlugin.DisposeCount);

            configuration.AddPlugin<CounterTestPlugin>();
            configuration.AddPlugin<CounterTestPlugin>();

            for (int i = 0; i < 2; i++) {
                foreach (var pluginRegistration in configuration.Plugins)
                    pluginRegistration.Plugin.Run(new EventPluginContext(new ExceptionlessClient(), new Event()));
            }

            configuration.RemovePlugin<CounterTestPlugin>();
            configuration.RemovePlugin<CounterTestPlugin>();


            Assert.Equal(1, CounterTestPlugin.ConstructorCount);
            Assert.Equal(2, CounterTestPlugin.RunCount);
            Assert.Equal(1, CounterTestPlugin.DisposeCount);
        }
开发者ID:adamzolotarev,项目名称:Exceptionless.Net,代码行数:25,代码来源:PluginTests.cs

示例6: LazyLoadAndRemovePlugin

        public void LazyLoadAndRemovePlugin() {
            var configuration = new ExceptionlessConfiguration(DependencyResolver.Default);
            foreach (var plugin in configuration.Plugins)
                configuration.RemovePlugin(plugin.Key);

            configuration.AddPlugin<ThrowIfInitializedTestPlugin>();
            configuration.RemovePlugin<ThrowIfInitializedTestPlugin>();
        }
开发者ID:adamzolotarev,项目名称:Exceptionless.Net,代码行数:8,代码来源:PluginTests.cs


注:本文中的ExceptionlessConfiguration.AddPlugin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。